mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Update tests to (Foo) { ... } syntax.
This commit is contained in:
@@ -23,14 +23,14 @@ fn void main()
|
||||
IntFooMap map;
|
||||
map.new_init();
|
||||
io::printfn("Map size: %d", map.count);
|
||||
map.set(1, Foo { 1, null });
|
||||
map.set(1, { 1, null });
|
||||
io::printfn("Map size: %d", map.count);
|
||||
map.set(1, Foo { 2, null });
|
||||
map.set(1, { 2, null });
|
||||
io::printfn("Map size: %d", map.count);
|
||||
(void)io::printfn("Val: %d", map.get(1).x);
|
||||
io::printfn("Has 1: %s", map.has_key(1));
|
||||
io::printfn("Has 2: %s", map.has_key(2));
|
||||
map.set(7, Foo { 4, null });
|
||||
map.set(7, { 4, null });
|
||||
io::printfn("Values: %s", map.value_new_list());
|
||||
IntDoubleMap map2;
|
||||
map2.new_init();
|
||||
|
||||
@@ -23,14 +23,14 @@ fn void main()
|
||||
IntFooMap map;
|
||||
map.new_init();
|
||||
io::printfn("Map size: %d", map.count);
|
||||
map.set(1, Foo { 1, null });
|
||||
map.set(1, { 1, null });
|
||||
io::printfn("Map size: %d", map.count);
|
||||
map.set(1, Foo { 2, null });
|
||||
map.set(1, { 2, null });
|
||||
io::printfn("Map size: %d", map.count);
|
||||
(void)io::printfn("Val: %d", map.get(1).x);
|
||||
io::printfn("Has 1: %s", map.has_key(1));
|
||||
io::printfn("Has 2: %s", map.has_key(2));
|
||||
map.set(7, Foo { 4, null });
|
||||
map.set(7, { 4, null });
|
||||
io::printfn("Values: %s", map.value_new_list());
|
||||
IntDoubleMap map2;
|
||||
map2.new_init();
|
||||
|
||||
@@ -10,9 +10,9 @@ fn void main()
|
||||
{
|
||||
|
||||
FooPriorityQueue agh;
|
||||
agh.push(Foo { 3 });
|
||||
agh.push(Foo { 101 });
|
||||
agh.push(Foo { 10 });
|
||||
agh.push((Foo) { 3 });
|
||||
agh.push((Foo) { 101 });
|
||||
agh.push({ 10 });
|
||||
while (try f = agh.pop()) io::printf("%s\n", f.x);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user