@@ -9,36 +9,36 @@ Allocator g_allocator = debug_allocator();
99// prelude
1010
1111UTEST (prelude, string_null_term) {
12- String str = " Hello World!" _str ;
12+ String str = " Hello World!" ;
1313 ASSERT_EQ (str.data [str.len ], 0 );
1414}
1515
1616UTEST (prelude, string_lines) {
17- String str = " line1\n l2\n this is a very long line 3" _str ;
17+ String str = " line1\n l2\n this is a very long line 3" ;
1818 SplitLinesIterator it = begin (SplitLines (str));
1919
20- ASSERT_EQ (*it, " line1" _str );
20+ ASSERT_EQ (*it, " line1" );
2121 ++it;
22- ASSERT_EQ (*it, " l2" _str );
22+ ASSERT_EQ (*it, " l2" );
2323 ++it;
24- ASSERT_EQ (*it, " this is a very long line 3" _str );
24+ ASSERT_EQ (*it, " this is a very long line 3" );
2525 ++it;
2626}
2727
2828UTEST (prelude, split_lines_non_null_term) {
2929 String str =
30- " line1\n l2\n line 3 some extra stuff that won't be in the string" _str ;
30+ " line1\n l2\n line 3 some extra stuff that won't be in the string" ;
3131 str.len = 15 ;
3232
3333 SplitLinesIterator it = begin (SplitLines (str));
3434
35- ASSERT_EQ (*it, " line1" _str );
35+ ASSERT_EQ (*it, " line1" );
3636 ++it;
37- ASSERT_EQ (*it, " l2" _str );
37+ ASSERT_EQ (*it, " l2" );
3838 ++it;
39- ASSERT_EQ (*it, " line 3" _str );
39+ ASSERT_EQ (*it, " line 3" );
4040 ++it;
41- ASSERT_EQ (*it, " " _str );
41+ ASSERT_EQ (*it, " " );
4242 ++it;
4343}
4444
@@ -104,18 +104,18 @@ UTEST(hash_map, insert) {
104104 HashMap<String> map;
105105 defer (hashmap_trash (&map));
106106
107- map[10 ] = " ten" _str ;
108- map[20 ] = " twenty" _str ;
109- map[30 ] = " thirty" _str ;
107+ map[10 ] = " ten" ;
108+ map[20 ] = " twenty" ;
109+ map[30 ] = " thirty" ;
110110}
111111
112112UTEST (hash_map, lookup) {
113113 HashMap<String> map;
114114 defer (hashmap_trash (&map));
115115
116- map[10 ] = " ten" _str ;
117- map[20 ] = " twenty" _str ;
118- map[30 ] = " thirty" _str ;
116+ map[10 ] = " ten" ;
117+ map[20 ] = " twenty" ;
118+ map[30 ] = " thirty" ;
119119
120120 String *ten = hashmap_get (&map, 10 );
121121 ASSERT_NE (ten, nullptr );
@@ -134,9 +134,9 @@ UTEST(hash_map, unset) {
134134 HashMap<String> map;
135135 defer (hashmap_trash (&map));
136136
137- map[1 ] = " one" _str ;
138- map[2 ] = " two" _str ;
139- map[3 ] = " three" _str ;
137+ map[1 ] = " one" ;
138+ map[2 ] = " two" ;
139+ map[3 ] = " three" ;
140140
141141 hashmap_unset (&map, 2 );
142142
@@ -149,9 +149,9 @@ UTEST(hash_map, iterator) {
149149 HashMap<String> map;
150150 defer (hashmap_trash (&map));
151151
152- String one = " one" _str ;
153- String two = " two" _str ;
154- String three = " three" _str ;
152+ String one = " one" ;
153+ String two = " two" ;
154+ String three = " three" ;
155155 map[1 ] = one;
156156 map[2 ] = two;
157157 map[3 ] = three;
@@ -171,9 +171,9 @@ UTEST(hash_map, drop_arrays) {
171171 HashMap<Array<u64 >> map;
172172 defer ({
173173 for (auto [k, v] : map) {
174- drop (v);
174+ array_trash (v);
175175 }
176- array_trash (&map);
176+ hashmap_trash (&map);
177177 });
178178
179179 for (u64 i = 1 ; i <= 100 ; i++) {
0 commit comments