Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Fantoom committed Aug 16, 2022
1 parent 0516cc7 commit 70ca721
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cesium.CodeGen.Tests/CodeGenMethodTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void VarArgMainDoesNotCompile2() => DoesNotCompile<WipException>(
[Fact] public Task Parameter1Get() => DoTest("int foo(int x){ return x + 1; }");
[Fact] public Task Parameter5Get() => DoTest("int foo(int a, int b, int c, int d, int e){ return e + 1; }");
[Fact] public Task CharConstTest() => DoTest("int main() { char x = '\\t'; return 42; }");
[Fact] public Task FloatConstTest() => DoTest("int main() { float x = 1.5; return 42; }");
[Fact] public Task DoubleConstTest() => DoTest("int main() { double x = 1.5; return 42; }");

[Fact] public Task MultiDeclaration() => DoTest("int main() { int x = 0, y = 2 + 2; }");

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
System.Int32 <Module>::main()
Locals:
System.Double V_0
IL_0000: ldc.r8 1.5
IL_0009: stloc.0
IL_000a: ldc.i4.s 42
IL_000c: ret

0 comments on commit 70ca721

Please sign in to comment.