1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Fixed some indenting issues, added indenting test

This commit is contained in:
Brian Fiete 2019-10-04 10:36:53 -07:00
parent df4573dca1
commit e5de09488e
7 changed files with 213 additions and 14 deletions

View file

@ -0,0 +1,9 @@
FileVersion = 1
[Project]
Name = "IDETest"
TargetType = "BeefWindowsApplication"
StartupObject = "IDETest.Program"
[Configs.Debug.Win64]
BeefLibType = "DynamicDebug"

View file

@ -0,0 +1,12 @@
FileVersion = 1
Projects = {IDETest = {Path = "."}}
Unlocked = ["corlib"]
[Workspace]
StartupProject = "IDETest"
[Configs.Debug.Win64]
IntermediateType = "ObjectAndIRCode"
[Configs.Debug.Win32]
IntermediateType = "ObjectAndIRCode"

View file

@ -0,0 +1,46 @@
ShowFile("src/Indent01.bf")
GotoText("//Test01")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 17)
GotoText("//Test02")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 21)
GotoText("//Test03")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 21)
GotoText("//Test04")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 25)
GotoText("//Test05")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 25)
GotoText("//Test06")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 21)
GotoText("//Test07")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 25)
GotoText("//Test08")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 21)
GotoText("//Test09")
AdjustCursor(0, -1)
CursorToLineEnd()
AssertIsAtColumn("Indent01.bf", 17)

View file

@ -0,0 +1,100 @@
namespace IDETest
{
class Indent01
{
static void Test01()
{
if (true)
//Test01
}
static void Test02()
{
if (true)
if (true)
//Test02
}
static void Test03()
{
if (true)
if (true)
;
else
//Test03
}
static void Test04()
{
if (true)
if (true)
for ()
//Test04
}
static void Test05()
{
if (true)
if (true)
;
else
for ()
//Test05
}
static void Test06()
{
if (true)
if (true)
;
else if (true)
//Test06
}
static void Test07()
{
if (true)
if (true)
;
else if (true)
for (int i < 10)
//Test07
}
static void Test08()
{
if (true)
if (true)
;
else if (true)
for (int i < 10)
;
else
//Test08
}
static void Test09()
{
if (true)
if (true)
;
else if (true)
for (int i < 10)
;
else
;
for (int i < 20)
//Test09
}
}
}