@@ -40,26 +40,26 @@ g.test_assert_is_box_null = function()
40
40
end
41
41
42
42
g .test_assert_equals_tnt_tuples = function ()
43
- t .assert_equals (box .tuple .new (1 ), box .tuple .new (1 ))
44
- t .assert_equals (box .tuple .new (1 , ' a' , box .NULL ), box .tuple .new (1 , ' a' , box .NULL ))
45
- t .assert_equals (box .tuple .new (1 , {' a' }), box .tuple .new (1 , {' a' }))
46
- t .assert_equals ({box .tuple .new (1 )}, {box .tuple .new (1 )})
47
- t .assert_equals ({box .tuple .new (1 )}, {{1 }})
48
- helper .assert_failure (t .assert_equals , box .tuple .new (1 ), box .tuple .new (2 ))
49
-
50
- t .assert_not_equals (box .tuple .new (1 ), box .tuple .new (2 ))
51
- t .assert_not_equals (box .tuple .new (1 , ' a' , box .NULL , {}), box .tuple .new (1 , ' a' ))
52
- t .assert_not_equals (box .tuple .new (1 , {' a' }), box .tuple .new (1 , {' b' }))
53
- helper .assert_failure (t .assert_not_equals , box .tuple .new (1 ), box .tuple .new (1 ))
43
+ t .assert_equals (box .tuple .new ({ 1 } ), box .tuple .new ({ 1 } ))
44
+ t .assert_equals (box .tuple .new ({ 1 , ' a' , box .NULL } ), box .tuple .new ({ 1 , ' a' , box .NULL } ))
45
+ t .assert_equals (box .tuple .new ({ 1 , {' a' }} ), box .tuple .new ({ 1 , {' a' } }))
46
+ t .assert_equals ({box .tuple .new ({ 1 } )}, {box .tuple .new ({ 1 } )})
47
+ t .assert_equals ({box .tuple .new ({ 1 } )}, {{1 }})
48
+ helper .assert_failure (t .assert_equals , box .tuple .new ({ 1 } ), box .tuple .new ({ 2 } ))
49
+
50
+ t .assert_not_equals (box .tuple .new ({ 1 } ), box .tuple .new ({ 2 } ))
51
+ t .assert_not_equals (box .tuple .new ({ 1 , ' a' , box .NULL , {}} ), box .tuple .new ({ 1 , ' a' } ))
52
+ t .assert_not_equals (box .tuple .new ({ 1 , {' a' }} ), box .tuple .new ({ 1 , {' b' } }))
53
+ helper .assert_failure (t .assert_not_equals , box .tuple .new ({ 1 } ), box .tuple .new ({ 1 } ))
54
54
55
55
-- Check that other cdata values works fine.
56
56
t .assert_equals (1 ULL, 0 ULL + 1 )
57
57
end
58
58
59
- g .test_assert_items_equals_tnt_tuples = function ()
60
- t .assert_items_equals ({box .tuple .new (1 )}, {box .tuple .new (1 )})
59
+ g .test_assert_items_equals_tnt_tuples_v3 = function ()
60
+ t .assert_items_equals ({box .tuple .new ({ 1 } )}, {box .tuple .new ({ 1 } )})
61
61
helper .assert_failure_contains (' Item values of the tables are not identical' ,
62
- t .assert_items_equals , {box .tuple .new (1 )}, {box .tuple .new (2 )})
62
+ t .assert_items_equals , {box .tuple .new ({ 1 } )}, {box .tuple .new ({ 2 } )})
63
63
end
64
64
65
65
g .test_fail_if_tnt_specific = function ()
@@ -115,14 +115,14 @@ g.test_assert_covers = function()
115
115
subject ({a = 1 , b = 2 , c = 3 }, {a = 1 , c = 3 })
116
116
subject ({a = 1 , b = 2 , c = 3 }, {a = 1 , b = 2 , c = 3 })
117
117
subject ({a = box .NULL }, {a = box .NULL })
118
- subject ({a = box .tuple .new (1 )}, {a = box .tuple .new (1 )})
118
+ subject ({a = box .tuple .new ({ 1 } )}, {a = box .tuple .new ({ 1 } )})
119
119
120
120
helper .assert_failure (subject , {a = 1 , b = 2 , c = 3 }, {a = 2 })
121
121
helper .assert_failure (subject , {a = 1 , b = 2 , c = 3 }, {a = 1 , b = 1 })
122
122
helper .assert_failure (subject , {a = 1 , b = 2 , c = 3 }, {a = 1 , b = 2 , c = 3 , d = 4 })
123
123
helper .assert_failure (subject , {a = 1 , b = 2 , c = 3 }, {d = 1 })
124
124
helper .assert_failure (subject , {a = nil }, {a = box .NULL })
125
- helper .assert_failure (subject , {a = box .tuple .new (1 )}, {a = box .tuple .new (2 )})
125
+ helper .assert_failure (subject , {a = box .tuple .new ({ 1 } )}, {a = box .tuple .new ({ 2 } )})
126
126
helper .assert_failure_contains (' Argument 1 and 2 must be tables' , subject , {a = 1 , b = 2 , c = 3 }, nil )
127
127
end
128
128
144
144
145
145
g .test_assert_items_include = function ()
146
146
local subject = t .assert_items_include
147
- subject ({1 , box .tuple .new (1 )}, {box .tuple .new (1 )})
147
+ subject ({1 , box .tuple .new ({ 1 } )}, {box .tuple .new ({ 1 } )})
148
148
149
- helper .assert_failure (subject , {box .tuple .new (1 )}, {box .tuple .new (2 )})
149
+ helper .assert_failure (subject , {box .tuple .new ({ 1 } )}, {box .tuple .new ({ 2 } )})
150
150
end
151
151
152
152
g .test_assert_type = function ()
0 commit comments