Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala 3 Infix #2158

Merged
merged 53 commits into from Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d1f4278
First batch of matchers DSL classes with functions marked as infix fo…
cheeseng Aug 12, 2022
00e0b7d
Enhanced FullyMatchWord.scala to include infix in DSL functions for S…
cheeseng Aug 12, 2022
a1665a4
Enhanced HaveWord.scala to include infix in DSL functions for Scala 3…
cheeseng Aug 12, 2022
df9f391
Enhanced IncludeWord.scala to include infix in DSL functions for Scal…
cheeseng Aug 12, 2022
d45c4a2
Enhanced LengthWord.scala to include infix in DSL functions for Scala…
cheeseng Aug 12, 2022
364cdea
Enhanced MatcherWords.scala to include infix in DSL functions for Sca…
cheeseng Aug 12, 2022
87f0e12
Enhanced NoExceptionWord.scala to include infix in DSL functions for …
cheeseng Aug 12, 2022
3d9118c
Enhanced ResultOfAnTypeInvocation.scala to include infix in DSL funct…
cheeseng Aug 12, 2022
d91207f
Enhanced ResultOfATypeInvocation.scala to include infix in DSL functi…
cheeseng Aug 12, 2022
8615636
Enhanced ResultOfBeThrownBy.scala to include infix in DSL functions f…
cheeseng Aug 12, 2022
1a1e32f
Enhanced ResultOfBeWordForAnType.scala to include infix in DSL functi…
cheeseng Aug 12, 2022
8381fde
Enhanced ResultOfBeWordForAType.scala to include infix in DSL functio…
cheeseng Aug 12, 2022
af03d29
Enhanced ResultOfBeWordForNoException.scala to include infix in DSL f…
cheeseng Aug 12, 2022
39df6fa
Enhanced ResultOfContainWord.scala to include infix in DSL functions …
cheeseng Aug 12, 2022
a1a2adc
Enhanced ResultOfGreaterThanComparison.scala to include infix in DSL …
cheeseng Aug 12, 2022
b4d14aa
Enhanced ResultOfGreaterThanOrEqualToComparison.scala to include infi…
cheeseng Aug 13, 2022
87f4ff7
Enhanced ResultOfLengthWordApplication.scala to include infix in DSL …
cheeseng Aug 13, 2022
e124a3a
Enhanced ResultOfLessThanComparison.scala to include infix in DSL fun…
cheeseng Aug 13, 2022
e16c23e
Enhanced ResultOfLessThanOrEqualToComparison.scala to include infix i…
cheeseng Aug 13, 2022
cfebf90
Enhanced ResultOfMessageWordApplication.scala to include infix in DSL…
cheeseng Aug 13, 2022
67311a5
Enhanced ResultOfNotExist.scala to include infix in DSL functions for…
cheeseng Aug 13, 2022
4f01909
Enhanced ResultOfSizeWordApplication.scala to include infix in DSL fu…
cheeseng Aug 13, 2022
adecc56
Enhanced ResultOfTheTypeInvocation.scala to include infix in DSL func…
cheeseng Aug 13, 2022
34cfb4c
Enhanced SizeWord.scala to include infix in DSL functions for Scala 3…
cheeseng Aug 13, 2022
22a9b21
Enhanced StartWithWord.scala to include infix in DSL functions for Sc…
cheeseng Aug 13, 2022
a142b6c
Work in progress enhancing Matchers.scala to include infix in DSL fun…
cheeseng Aug 13, 2022
b0fd774
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 14, 2022
5dd8358
Fixed Scala 3 js and native build.
cheeseng Aug 14, 2022
15088a3
Removed unnecessary if or check.
cheeseng Aug 14, 2022
6ceddcb
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 14, 2022
f84f3eb
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
958b4bf
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
cdc03ad
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
5827de6
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
d0dbcbe
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
cebe03a
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
fa22822
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
af9e0bc
Another batch of Work in progress enhancing Matchers.scala to include…
cheeseng Aug 15, 2022
52daf27
Completed enhancing Matchers.scala to include infix in DSL functions …
cheeseng Aug 15, 2022
3f56b52
Removed infix for <, <=, > and >= functions in Matchers.scala.
cheeseng Aug 16, 2022
d54b7dd
Removed infix for >, >=, < and <= functions in BeWord.scala.
cheeseng Aug 16, 2022
c8dcf54
Removed infix for === function in BeWord.scala.
cheeseng Aug 16, 2022
a90c2b7
Removed infix modifier for apply functions in Matchers.scala.
cheeseng Aug 16, 2022
ebceea7
Removed infix modifier for apply functions in BeWord.scala.
cheeseng Aug 16, 2022
f5d5504
Removed infix modifier from apply functions in MatchPatternWord.scala…
cheeseng Aug 16, 2022
9ca3603
Removed infix modifier for apply functions in ContainWord, EndWithWor…
cheeseng Aug 16, 2022
0b07768
Removed infix modifier from apply functions in IncludeWord, LengthWor…
cheeseng Aug 16, 2022
3bea02a
Removed infix modifier in for apply functions in ResultOfGreaterThanO…
cheeseng Aug 16, 2022
806339b
Removed infix modifier for apply functions in ResultOfLessThanOrEqual…
cheeseng Aug 16, 2022
a8b03ca
Removed infix modifier for apply functions in SizeWord and StartWithW…
cheeseng Aug 16, 2022
3c12779
Removed infix modifier for functions in Matchers.scala that is not us…
cheeseng Aug 17, 2022
9707b89
Removed infix modifier for functions in MatcherWords.scala that is no…
cheeseng Aug 17, 2022
e6efb6f
Removed unnecessary infix modifiers in NotWord.scala.
cheeseng Aug 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -247,7 +247,7 @@ final class BeWord {
* ^
* </pre>
**/
def a(right: Symbol)(implicit prettifier: Prettifier, pos: source.Position): Matcher[AnyRef] =
infix def a(right: Symbol)(implicit prettifier: Prettifier, pos: source.Position): Matcher[AnyRef] =
new Matcher[AnyRef] {
def apply(left: AnyRef): MatchResult = matchSymbolToPredicateMethod(left, right, true, true, prettifier, pos)
override def toString: String = "be a " + prettifier(right)
Expand All @@ -263,7 +263,7 @@ final class BeWord {
* ^
* </pre>
**/
def a[S <: AnyRef](bePropertyMatcher: BePropertyMatcher[S]): Matcher[S] =
infix def a[S <: AnyRef](bePropertyMatcher: BePropertyMatcher[S]): Matcher[S] =
new Matcher[S] {
def apply(left: S): MatchResult = {
val result = bePropertyMatcher(left)
Expand All @@ -285,7 +285,7 @@ final class BeWord {
* ^
* </pre>
**/
def a[S](aMatcher: AMatcher[S]): Matcher[S] =
infix def a[S](aMatcher: AMatcher[S]): Matcher[S] =
new Matcher[S] {
def apply(left: S): MatchResult = aMatcher(left)
override def toString: String = "be a " + Prettifier.default(aMatcher)
Expand All @@ -300,7 +300,7 @@ final class BeWord {
* ^
* </pre>
**/
def an(right: Symbol)(implicit prettifier: Prettifier, pos: source.Position): Matcher[AnyRef] =
infix def an(right: Symbol)(implicit prettifier: Prettifier, pos: source.Position): Matcher[AnyRef] =
new Matcher[AnyRef] {
def apply(left: AnyRef): MatchResult = matchSymbolToPredicateMethod(left, right, true, false, prettifier, pos)
override def toString: String = "be an " + Prettifier.default(right)
Expand All @@ -316,7 +316,7 @@ final class BeWord {
* ^
* </pre>
**/
def an[S <: AnyRef](bePropertyMatcher: BePropertyMatcher[S]): Matcher[S] =
infix def an[S <: AnyRef](bePropertyMatcher: BePropertyMatcher[S]): Matcher[S] =
new Matcher[S] {
def apply(left: S): MatchResult = {
val result = bePropertyMatcher(left)
Expand All @@ -338,7 +338,7 @@ final class BeWord {
* ^
* </pre>
**/
def an[S](anMatcher: AnMatcher[S]): Matcher[S] =
infix def an[S](anMatcher: AnMatcher[S]): Matcher[S] =
new Matcher[S] {
def apply(left: S): MatchResult = anMatcher(left)
override def toString: String = "be an " + Prettifier.default(anMatcher)
Expand Down Expand Up @@ -373,7 +373,7 @@ final class BeWord {
* ^
* </pre>
**/
def theSameInstanceAs(right: AnyRef): Matcher[AnyRef] =
infix def theSameInstanceAs(right: AnyRef): Matcher[AnyRef] =
new Matcher[AnyRef] {
def apply(left: AnyRef): MatchResult =
MatchResult(
Expand Down Expand Up @@ -566,7 +566,7 @@ final class BeWord {
* ^
* </pre>
**/
def definedAt[A, U <: PartialFunction[A, _]](right: A): Matcher[U] =
infix def definedAt[A, U <: PartialFunction[A, _]](right: A): Matcher[U] =
new Matcher[U] {
def apply(left: U): MatchResult =
MatchResult(
Expand All @@ -586,7 +586,7 @@ final class BeWord {
* ^
* </pre>
**/
def thrownBy(code: => Unit) = new ResultOfBeThrownBy(Vector(() => code))
infix def thrownBy(code: => Unit) = new ResultOfBeThrownBy(Vector(() => code))

/**
* This method enables the following syntax, where <code>fraction</code> refers to a <code>PartialFunction</code>:
Expand Down