mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Added tests for typed primitives
This commit is contained in:
parent
cfc25003a0
commit
24d083f028
3 changed files with 26 additions and 0 deletions
10
IDE/Tests/Test1/scripts/TypedPrimitives.txt
Normal file
10
IDE/Tests/Test1/scripts/TypedPrimitives.txt
Normal file
|
@ -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")
|
|
@ -28,6 +28,7 @@ namespace IDETest
|
|||
MemoryBreakpointTester.Test();
|
||||
SplatTester.Test();
|
||||
Stepping_Scope.Test();
|
||||
TypedPrimitives.Test();
|
||||
Unions.Test();
|
||||
Virtuals.Test();
|
||||
|
||||
|
|
15
IDE/Tests/Test1/src/TypedPrimitives.bf
Normal file
15
IDE/Tests/Test1/src/TypedPrimitives.bf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
class TypedPrimitives
|
||||
{
|
||||
struct StructA : float
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static void Test()
|
||||
{
|
||||
//Test_Start
|
||||
StructA sa = (.)1.2f;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue