Skip to content

Commit 7e83764

Browse files
committed
And the tests of __cmp too
1 parent 33f6d05 commit 7e83764

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/TestingMacrosTests/ConditionMacroTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct ConditionMacroTests {
3535
##"#expect(9 > 8 && 7 > 6, "Some comment")"##:
3636
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in __ec(__ec(9 > 8, 0x2) && __ec(7 > 6, 0x400), 0x0) }, sourceCode: [0x0: "9 > 8 && 7 > 6", 0x2: "9 > 8", 0x400: "7 > 6"], comments: ["Some comment"], isRequired: false, sourceLocation: Testing.SourceLocation.__here()).__expected()"##,
3737
##"#expect("a" == "b")"##:
38-
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in __ec.__cmp(==, 0x0, "a", 0x2, "b", 0x200) }, sourceCode: [0x0: #""a" == "b""#], comments: [], isRequired: false, sourceLocation: Testing.SourceLocation.__here()).__expected()"##,
38+
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in __ec.__cmp({ $0 == $1 }, 0x0, "a", 0x2, "b", 0x200) }, sourceCode: [0x0: #""a" == "b""#], comments: [], isRequired: false, sourceLocation: Testing.SourceLocation.__here()).__expected()"##,
3939
##"#expect(!Bool.random())"##:
4040
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in __ec(!__ec(__ec(Bool.self, 0x1c).random(), 0x4), 0x0) }, sourceCode: [0x0: "!Bool.random()", 0x4: "Bool.random()", 0x1c: "Bool"], comments: [], isRequired: false, sourceLocation: Testing.SourceLocation.__here()).__expected()"##,
4141
##"#expect((true && false))"##:
@@ -116,7 +116,7 @@ struct ConditionMacroTests {
116116
##"#require(9 > 8 && 7 > 6, "Some comment")"##:
117117
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in try Testing.__requiringTry(__ec(__ec(9 > 8, 0x2) && __ec(7 > 6, 0x400), 0x0)) }, sourceCode: [0x0: "9 > 8 && 7 > 6", 0x2: "9 > 8", 0x400: "7 > 6"], comments: ["Some comment"], isRequired: true, sourceLocation: Testing.SourceLocation.__here()).__required()"##,
118118
##"#require("a" == "b")"##:
119-
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in try Testing.__requiringTry(__ec.__cmp(==, 0x0, "a", 0x2, "b", 0x200)) }, sourceCode: [0x0: #""a" == "b""#], comments: [], isRequired: true, sourceLocation: Testing.SourceLocation.__here()).__required()"##,
119+
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in try Testing.__requiringTry(__ec.__cmp({ $0 == $1 }, 0x0, "a", 0x2, "b", 0x200)) }, sourceCode: [0x0: #""a" == "b""#], comments: [], isRequired: true, sourceLocation: Testing.SourceLocation.__here()).__required()"##,
120120
##"#require(!Bool.random())"##:
121121
##"Testing.__checkCondition({ (__ec: inout Testing.__ExpectationContext) -> Swift.Bool in try Testing.__requiringTry(__ec(!__ec(__ec(Bool.self, 0x1c).random(), 0x4), 0x0)) }, sourceCode: [0x0: "!Bool.random()", 0x4: "Bool.random()", 0x1c: "Bool"], comments: [], isRequired: true, sourceLocation: Testing.SourceLocation.__here()).__required()"##,
122122
##"#require((true && false))"##:

0 commit comments

Comments
 (0)