44mod common;
55
66use common:: TestResult ;
7- use snapcrab:: value:: Value ;
87
98check_interpreter ! (
109 test_simple_success,
@@ -29,7 +28,7 @@ check_custom_start!(
2928 test_valid_custom_start,
3029 input = "valid_custom_start.rs" ,
3130 start_fn = "my_custom_start" ,
32- result = TestResult :: SuccessWithValue ( Value :: from_type ( 123 ) )
31+ result = TestResult :: SuccessWithValue ( vec! [ 123 , 0 , 0 , 0 ] )
3332) ;
3433
3534check_custom_start ! (
@@ -50,56 +49,56 @@ check_custom_start!(
5049 test_tuple_creation,
5150 input = "tuple_function.rs" ,
5251 start_fn = "simple_tuple" ,
53- result = TestResult :: SuccessWithValue ( Value :: from_bytes ( & [ 1 , 42 , 0 , 0 , 232 , 3 , 0 , 0 ] ) )
52+ result = TestResult :: SuccessWithValue ( vec! [ 1 , 42 , 0 , 0 , 232 , 3 , 0 , 0 ] )
5453) ;
5554
5655check_custom_start ! (
5756 test_simple_tuple_ops,
5857 input = "tuple_operations.rs" ,
5958 start_fn = "simple_tuple" ,
60- result = TestResult :: SuccessWithValue ( Value :: from_bytes ( & [ 1 , 42 , 0 , 0 , 232 , 3 , 0 , 0 ] ) )
59+ result = TestResult :: SuccessWithValue ( vec! [ 1 , 42 , 0 , 0 , 232 , 3 , 0 , 0 ] )
6160) ;
6261
6362check_custom_start ! (
6463 test_unit_tuple,
6564 input = "tuple_operations.rs" ,
6665 start_fn = "unit_tuple" ,
67- result = TestResult :: SuccessWithValue ( Value :: unit ( ) . clone ( ) )
66+ result = TestResult :: SuccessWithValue ( vec! [ ] )
6867) ;
6968
7069check_custom_start ! (
7170 test_single_element_tuple,
7271 input = "tuple_operations.rs" ,
7372 start_fn = "single_element_tuple" ,
74- result = TestResult :: SuccessWithValue ( Value :: from_type ( 42 ) )
73+ result = TestResult :: SuccessWithValue ( vec! [ 42 , 0 , 0 , 0 ] )
7574) ;
7675
7776check_custom_start ! (
7877 test_reordered_tuple,
7978 input = "tuple_operations.rs" ,
8079 start_fn = "reordered_tuple" ,
81- result = TestResult :: SuccessWithValue ( Value :: from_bytes ( & [ 232 , 3 , 0 , 0 , 42 , 1 , 0 , 0 ] ) )
80+ result = TestResult :: SuccessWithValue ( vec! [ 232 , 3 , 0 , 0 , 42 , 1 , 0 , 0 ] )
8281) ;
8382
8483check_custom_start ! (
8584 test_another_order,
8685 input = "tuple_operations.rs" ,
8786 start_fn = "another_order" ,
88- result = TestResult :: SuccessWithValue ( Value :: from_bytes ( & [ 232 , 3 , 0 , 0 , 1 , 42 , 0 , 0 ] ) )
87+ result = TestResult :: SuccessWithValue ( vec! [ 232 , 3 , 0 , 0 , 1 , 42 , 0 , 0 ] )
8988) ;
9089
9190check_custom_start ! (
9291 test_bool_return,
9392 input = "bool_function.rs" ,
9493 start_fn = "returns_true" ,
95- result = TestResult :: SuccessWithValue ( Value :: from_bool ( true ) )
94+ result = TestResult :: SuccessWithValue ( vec! [ 1 ] )
9695) ;
9796
9897check_custom_start ! (
9998 test_mut_reference,
10099 input = "reference_test.rs" ,
101100 start_fn = "test_mut_ref" ,
102- result = TestResult :: SuccessWithValue ( Value :: from_type ( 100i32 ) )
101+ result = TestResult :: SuccessWithValue ( vec! [ 100 , 0 , 0 , 0 ] )
103102) ;
104103
105104check_custom_start ! (
@@ -120,22 +119,22 @@ check_custom_start!(
120119 test_mutable_reference_chain,
121120 input = "reference_test.rs" ,
122121 start_fn = "test_mut_ref_chain" ,
123- result = TestResult :: SuccessWithValue ( Value :: from_type ( 15i32 ) )
122+ result = TestResult :: SuccessWithValue ( vec! [ 15 , 0 , 0 , 0 ] )
124123) ;
125124
126125check_custom_start ! (
127126 test_basic_reference,
128127 input = "reference_test.rs" ,
129128 start_fn = "test_basic_ref" ,
130- result = TestResult :: SuccessWithValue ( Value :: from_type ( 42i32 ) )
129+ result = TestResult :: SuccessWithValue ( vec! [ 42 , 0 , 0 , 0 ] )
131130) ;
132131
133132#[ cfg( target_endian = "little" ) ]
134133check_custom_start ! (
135134 test_tuple_field_ref,
136135 input = "reference_test.rs" ,
137136 start_fn = "test_tuple_field_ref" ,
138- result = TestResult :: SuccessWithValue ( Value :: from_bytes ( & [ 52 , 10 ] ) )
137+ result = TestResult :: SuccessWithValue ( vec! [ 52 , 10 ] )
139138) ;
140139
141140check_custom_start ! (
@@ -149,7 +148,7 @@ check_custom_start!(
149148 test_tuple_field_sub,
150149 input = "tuple_operations.rs" ,
151150 start_fn = "tuple_field_sub" ,
152- result = TestResult :: SuccessWithValue ( Value :: from_type ( 42i8 ) )
151+ result = TestResult :: SuccessWithValue ( vec! [ 42 ] )
153152) ;
154153
155154check_custom_start ! (
@@ -163,7 +162,7 @@ check_custom_start!(
163162 test_ptr_compare,
164163 input = "raw_pointer_test.rs" ,
165164 start_fn = "ptr_compare" ,
166- result = TestResult :: SuccessWithValue ( Value :: from_bool ( true ) )
165+ result = TestResult :: SuccessWithValue ( vec! [ 1 ] )
167166) ;
168167
169168check_custom_start ! (
@@ -186,14 +185,14 @@ check_custom_start!(
186185 test_check_size_of,
187186 input = "size_align_test.rs" ,
188187 start_fn = "check_size_of" ,
189- result = TestResult :: SuccessWithValue ( Value :: from_bool ( true ) )
188+ result = TestResult :: SuccessWithValue ( vec! [ 1 ] )
190189) ;
191190
192191check_custom_start ! (
193192 test_check_align_of,
194193 input = "size_align_test.rs" ,
195194 start_fn = "check_align_of" ,
196- result = TestResult :: SuccessWithValue ( Value :: from_bool ( true ) )
195+ result = TestResult :: SuccessWithValue ( vec! [ 1 ] )
197196) ;
198197
199198check_custom_start ! (
0 commit comments