mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Adding new test suite
This commit is contained in:
parent
a13042b96c
commit
61b440ea36
6 changed files with 93 additions and 0 deletions
5
IDE/Tests/DebuggerTest01/BeefProj.toml
Normal file
5
IDE/Tests/DebuggerTest01/BeefProj.toml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
FileVersion = 1
|
||||||
|
|
||||||
|
[Project]
|
||||||
|
Name = "Test"
|
||||||
|
StartupObject = "Test.Program"
|
5
IDE/Tests/DebuggerTest01/BeefSpace.toml
Normal file
5
IDE/Tests/DebuggerTest01/BeefSpace.toml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
FileVersion = 1
|
||||||
|
Projects = {Test = {Path = "."}}
|
||||||
|
|
||||||
|
[Workspace]
|
||||||
|
StartupProject = "Test"
|
22
IDE/Tests/DebuggerTest01/scripts/Container01.txt
Normal file
22
IDE/Tests/DebuggerTest01/scripts/Container01.txt
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# This ensures that we entry [4] remains open even after removing them item above it
|
||||||
|
ShowFile("src/Container.bf")
|
||||||
|
GotoText("//TestA")
|
||||||
|
ToggleBreakpoint()
|
||||||
|
GotoText("//TestB")
|
||||||
|
ToggleBreakpoint()
|
||||||
|
RunWithCompiling()
|
||||||
|
ShowWatches()
|
||||||
|
AddWatch("list")
|
||||||
|
SelectWatch("list")
|
||||||
|
OpenSelectedWatches()
|
||||||
|
SelectWatch("[4]")
|
||||||
|
OpenSelectedWatches()
|
||||||
|
FocusWatchDir(2)
|
||||||
|
AssertSelectedWatchEquals("5")
|
||||||
|
StepOver()
|
||||||
|
SelectWatch("[4]")
|
||||||
|
FocusWatchDir(2)
|
||||||
|
AssertSelectedWatchEquals("6")
|
||||||
|
Continue()
|
||||||
|
SelectWatch("[4]")
|
||||||
|
AssertSelectedWatchEquals("4")
|
43
IDE/Tests/DebuggerTest01/src/Container.bf
Normal file
43
IDE/Tests/DebuggerTest01/src/Container.bf
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
class Container
|
||||||
|
{
|
||||||
|
static void TestB()
|
||||||
|
{
|
||||||
|
List<int> list = scope .();
|
||||||
|
for (int i < 5)
|
||||||
|
list.Add(i);
|
||||||
|
|
||||||
|
//TestB
|
||||||
|
list.Remove(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TestA()
|
||||||
|
{
|
||||||
|
List<String> list = scope .();
|
||||||
|
list.Add("A");
|
||||||
|
list.Add("AB");
|
||||||
|
list.Add("ABC");
|
||||||
|
list.Add("ABCD");
|
||||||
|
list.Add("ABCDE");
|
||||||
|
list.Add("ABCDEF");
|
||||||
|
|
||||||
|
for (int i < 100)
|
||||||
|
{
|
||||||
|
list.Add(scope:: String()..AppendF("Str{}", i));
|
||||||
|
}
|
||||||
|
|
||||||
|
//TestA
|
||||||
|
list.RemoveAt(3);
|
||||||
|
TestB();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Test()
|
||||||
|
{
|
||||||
|
TestA();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
IDE/Tests/DebuggerTest01/src/Program.bf
Normal file
14
IDE/Tests/DebuggerTest01/src/Program.bf
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#pragma warning disable 168
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Container.Test();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,6 +19,10 @@ PUSHD %~dp0..\
|
||||||
@CALL :TEST
|
@CALL :TEST
|
||||||
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
||||||
|
|
||||||
|
@SET TESTPATH=IDE\Tests\DebuggerTests
|
||||||
|
@CALL :TEST
|
||||||
|
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
||||||
|
|
||||||
@SET TESTPATH=IDE\Tests\TestDynCrt1
|
@SET TESTPATH=IDE\Tests\TestDynCrt1
|
||||||
@CALL :TEST
|
@CALL :TEST
|
||||||
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue