-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
This test fails:
@it("matches a numeric value")
@params(10.23!, "Float")
@params(10.23#, "Double")
@params(10&, "LongInteger")
sub _(number as Dynamic, expectedType as String)
m.assertEqual(rooibos.common.getSafeType(number), expectedType)
end sub
✔ matches a numeric value 0 [10.23,"Float"]
✖ matches a numeric value 1 [10.23,"Double"]
✖ matches a numeric value 2 [10,"LongInteger"]
matches a numeric value 1:
AssertionError: expected ""Float"" to equal ""Double""
+ expected - actual
-"Float"
+"Double"
matches a numeric value 2:
AssertionError: expected ""Integer"" to equal ""LongInteger""
+ expected - actual
-"Integer"
+"LongInteger"
This is because the symbols get stripped from the literals when generating rawParams
:
[
{
isSolo: false
noCatch: false
funcName: "FullColdStartWithProfilesMatcher_matches_a_numeric_value"
isIgnored: false
isAsync: false
asyncTimeout: 2000
slow: 75
isParamTest: true
name: "matches a numeric value"
lineNumber: 14
paramLineNumber: 11
assertIndex: 0
rawParams: [
10.23 ' <-- missing !
"Float"
]
paramTestIndex: 0
expectedNumberOfParams: 2
isParamsValid: true
}
{
isSolo: false
noCatch: false
funcName: "FullColdStartWithProfilesMatcher_matches_a_numeric_value"
isIgnored: false
isAsync: false
asyncTimeout: 2000
slow: 75
isParamTest: true
name: "matches a numeric value"
lineNumber: 14
paramLineNumber: 12
assertIndex: 0
rawParams: [
10.23 ' <-- missing #
"Double"
]
paramTestIndex: 1
expectedNumberOfParams: 2
isParamsValid: true
}
{
isSolo: false
noCatch: false
funcName: "FullColdStartWithProfilesMatcher_matches_a_numeric_value"
isIgnored: false
isAsync: false
asyncTimeout: 2000
slow: 75
isParamTest: true
name: "matches a numeric value"
lineNumber: 14
paramLineNumber: 13
assertIndex: 0
rawParams: [
10 ' <-- missing &
"LongInteger"
]
paramTestIndex: 2
expectedNumberOfParams: 2
isParamsValid: true
}
]
Metadata
Metadata
Assignees
Labels
No labels