mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Remove some deprecated use.
This commit is contained in:
@@ -18,7 +18,7 @@ fn void map()
|
||||
{
|
||||
TestHashMap m;
|
||||
assert(!m.is_initialized());
|
||||
m.temp_init();
|
||||
m.tinit();
|
||||
assert(m.is_initialized());
|
||||
assert(m.is_empty());
|
||||
assert(m.len() == 0);
|
||||
@@ -42,7 +42,7 @@ fn void map()
|
||||
}
|
||||
|
||||
List list;
|
||||
list.temp_init();
|
||||
list.tinit();
|
||||
m.@each(;String key, usz value)
|
||||
{
|
||||
list.push({key, value});
|
||||
@@ -83,7 +83,7 @@ fn void map_remove()
|
||||
{
|
||||
TestHashMap m;
|
||||
assert(!@ok(m.remove("A")));
|
||||
m.temp_init();
|
||||
m.tinit();
|
||||
assert(!@ok(m.remove("A")));
|
||||
m.set("A", 0);
|
||||
assert(@ok(m.remove("A")));
|
||||
@@ -92,14 +92,14 @@ fn void map_remove()
|
||||
fn void map_copy()
|
||||
{
|
||||
TestHashMap hash_map;
|
||||
hash_map.temp_init();
|
||||
hash_map.tinit();
|
||||
|
||||
hash_map.set("aa", 1);
|
||||
hash_map.set("b", 2);
|
||||
hash_map.set("bb", 1);
|
||||
|
||||
TestHashMap hash_map_copy;
|
||||
hash_map_copy.temp_init_from_map(&hash_map);
|
||||
hash_map_copy.tinit_from_map(&hash_map);
|
||||
|
||||
assert(hash_map_copy.len() == hash_map.len());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user