From 24d083f0280a6d69674b56bfe7901cb6a1f84c6d Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 15 May 2020 15:08:26 -0700 Subject: [PATCH] Added tests for typed primitives --- IDE/Tests/Test1/scripts/TypedPrimitives.txt | 10 ++++++++++ IDE/Tests/Test1/src/Program.bf | 1 + IDE/Tests/Test1/src/TypedPrimitives.bf | 15 +++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 IDE/Tests/Test1/scripts/TypedPrimitives.txt create mode 100644 IDE/Tests/Test1/src/TypedPrimitives.bf diff --git a/IDE/Tests/Test1/scripts/TypedPrimitives.txt b/IDE/Tests/Test1/scripts/TypedPrimitives.txt new file mode 100644 index 00000000..81f03754 --- /dev/null +++ b/IDE/Tests/Test1/scripts/TypedPrimitives.txt @@ -0,0 +1,10 @@ +ShowFile("src/TypedPrimitives.bf") +GotoText("//Test_Start") +ToggleBreakpoint() +RunWithCompiling() +StepOver() + +AssertEvalEquals("sa", "{ 1.2 }") +AssertEvalEquals("sa + 30", "31.2") +AssertEvalEquals("sa == sa", "true") +AssertEvalEquals("sa == 1.2f", "true") diff --git a/IDE/Tests/Test1/src/Program.bf b/IDE/Tests/Test1/src/Program.bf index 6582c5b5..28b07036 100644 --- a/IDE/Tests/Test1/src/Program.bf +++ b/IDE/Tests/Test1/src/Program.bf @@ -28,6 +28,7 @@ namespace IDETest MemoryBreakpointTester.Test(); SplatTester.Test(); Stepping_Scope.Test(); + TypedPrimitives.Test(); Unions.Test(); Virtuals.Test(); diff --git a/IDE/Tests/Test1/src/TypedPrimitives.bf b/IDE/Tests/Test1/src/TypedPrimitives.bf new file mode 100644 index 00000000..a6442edf --- /dev/null +++ b/IDE/Tests/Test1/src/TypedPrimitives.bf @@ -0,0 +1,15 @@ +#pragma warning disable 168 + +class TypedPrimitives +{ + struct StructA : float + { + + } + + public static void Test() + { + //Test_Start + StructA sa = (.)1.2f; + } +} \ No newline at end of file