File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Tests/RegoTests/BuiltinTests Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ extension BuiltinTests.NumbersTests {
45
45
BuiltinError . evalError (
46
46
msg: " operand 2 must be integer number but got floating-point number " ) )
47
47
) ,
48
+ BuiltinTests . TestCase (
49
+ description: " when a and b are floats with integer value " ,
50
+ name: " numbers.range " ,
51
+ args: [ 1.0000 , 3.0000 ] ,
52
+ expected: . success( [ 1 , 2 , 3 ] )
53
+ ) ,
48
54
]
49
55
50
56
static let rangeStepTests : [ BuiltinTests . TestCase ] = [
@@ -110,6 +116,12 @@ extension BuiltinTests.NumbersTests {
110
116
BuiltinError . evalError (
111
117
msg: " step must be a positive integer " ) )
112
118
) ,
119
+ BuiltinTests . TestCase (
120
+ description: " when a, b and step are floats with integer value " ,
121
+ name: " numbers.range_step " ,
122
+ args: [ 1.0000 , 10.000 , 3.00 ] ,
123
+ expected: . success( [ 1 , 4 , 7 , 10 ] )
124
+ ) ,
113
125
]
114
126
115
127
static var allTests : [ BuiltinTests . TestCase ] {
You can’t perform that action at this time.
0 commit comments