1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Test changes

This commit is contained in:
Brian Fiete 2019-12-11 16:56:09 -08:00
parent 8b71f8d49a
commit 7247cad7f3
10 changed files with 121 additions and 59 deletions

View file

@ -12,7 +12,6 @@ FileVersion = "0.42.1"
[Configs.Debug.Win32] [Configs.Debug.Win32]
TargetName = "" TargetName = ""
OtherLinkFlags = "" OtherLinkFlags = ""
OptimizationLevel = "O0"
[Configs.Debug.Win64] [Configs.Debug.Win64]
TargetDirectory = "$(WorkspaceDir)/../IDE/dist" TargetDirectory = "$(WorkspaceDir)/../IDE/dist"
@ -62,7 +61,6 @@ PreprocessorMacros = ["CLI"]
[Configs.Release.Win32] [Configs.Release.Win32]
TargetName = "" TargetName = ""
OtherLinkFlags = "" OtherLinkFlags = ""
OptimizationLevel = "O0"
[Configs.Release.Win64] [Configs.Release.Win64]
TargetDirectory = "$(WorkspaceDir)/../IDE/dist" TargetDirectory = "$(WorkspaceDir)/../IDE/dist"
@ -72,23 +70,20 @@ DebugCommandArguments = "-proddir=..\\..\\BeefPerf -config=Release"
DebugWorkingDirectory = "$(ProjectDir)\\dist" DebugWorkingDirectory = "$(ProjectDir)\\dist"
EnvironmentVars = ["_NO_DEBUG_HEAP=1"] EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
PreprocessorMacros = ["RELEASE", "CLI"] PreprocessorMacros = ["RELEASE", "CLI"]
OptimizationLevel = "O0"
[Configs.Debug2.Win32] [Configs.Debug2.Win32]
TargetName = "" TargetName = ""
OtherLinkFlags = "" OtherLinkFlags = ""
OptimizationLevel = "O0"
[Configs.Debug2.Win64] [Configs.Debug2.Win64]
TargetDirectory = "$(WorkspaceDir)/dist" TargetDirectory = "$(WorkspaceDir)/dist"
TargetName = "$(ProjectName)_d2" TargetName = "$(ProjectName)_d2"
OtherLinkFlags = "Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib Beef042RT64_d.lib IDEHelper64_d.lib BeefySysLib64_d.lib" OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib Rpcrt4.lib Ole32.lib"
CLibType = "Dynamic" CLibType = "DynamicDebug"
DebugCommandArguments = "-proddir=c:\\beef\\IDEHelper\\Tests -test" DebugCommandArguments = "-proddir=c:\\beef\\IDEHelper\\Tests -test"
DebugWorkingDirectory = "c:\\beef\\IDE\\dist" DebugWorkingDirectory = "c:\\beef\\IDE\\dist"
EnvironmentVars = ["_NO_DEBUG_HEAP=1"] EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
PreprocessorMacros = ["DEBUG", "CLI"] PreprocessorMacros = ["DEBUG", "CLI"]
OptimizationLevel = "OgPlus"
[Configs.Test.Win32] [Configs.Test.Win32]
OtherLinkFlags = "BeefRT32_d.lib" OtherLinkFlags = "BeefRT32_d.lib"

View file

@ -62,7 +62,10 @@ ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, I
[Configs.Debug2.Win64] [Configs.Debug2.Win64]
PreprocessorMacros = ["NEWFONT"] PreprocessorMacros = ["NEWFONT"]
BfOptimizationLevel = "O0" EnableObjectDebugFlags = false
EmitObjectAccessCheck = false
EnableRealtimeLeakCheck = false
AllowHotSwapping = false
IntermediateType = "ObjectAndIRCode" IntermediateType = "ObjectAndIRCode"
ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, IDEHelper = {Config = "Debug"}, Debugger64 = {Config = "Debug"}, BeefySysLib = {Config = "Debug"}} ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, IDEHelper = {Config = "Debug"}, Debugger64 = {Config = "Debug"}, BeefySysLib = {Config = "Debug"}}

View file

@ -71,7 +71,7 @@ namespace System
return type; return type;
} }
#if BF_ALLOW_HOT_SWAPPING #if BF_DYNAMIC_CAST_CHECK || BF_ENABLE_REALTIME_LEAK_CHECK
[NoShow] [NoShow]
public virtual Object DynamicCastToTypeId(int32 typeId) public virtual Object DynamicCastToTypeId(int32 typeId)
{ {

View file

@ -1,4 +1,3 @@
//2
#define _ENABLE_ATOMIC_ALIGNMENT_FIX #define _ENABLE_ATOMIC_ALIGNMENT_FIX
#include <windows.h> #include <windows.h>
@ -134,10 +133,22 @@ void Zorq3()
int64_t q = 999; int64_t q = 999;
} }
void TestMem()
{
char* mem = (char*)::VirtualAlloc(0, 4096 * 2, MEM_RESERVE, PAGE_READWRITE);
::VirtualAlloc(mem, 4096, MEM_COMMIT, PAGE_READWRITE);
char* str = "Hey";
char* cPtr = mem + 4096 - 3;
memcpy(cPtr, str, 3);
}
// THIS IS VERSION 6. // THIS IS VERSION 6.
extern "C" extern "C"
__declspec(dllexport) void Test2(int aa, int bb, int cc, int dd) __declspec(dllexport) void Test2(int aa, int bb, int cc, int dd)
{ {
TestMem();
Zorq(); Zorq();
Zorq2(); Zorq2();
Zorq3(); Zorq3();

View file

@ -25,7 +25,7 @@ OtherLinkFlags = ""
TargetDirectory = "$(WorkspaceDir)/dist" TargetDirectory = "$(WorkspaceDir)/dist"
TargetName = "BeefIDE_d" TargetName = "BeefIDE_d"
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib" OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib"
DebugCommandArguments = "-proddir=C:\\Beef\\IDE" DebugCommandArguments = "-workspace=C:\\Beef\\BeefBuild"
DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest" DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest"
EnvironmentVars = ["_NO_DEBUG_HEAP=1"] EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
@ -49,7 +49,6 @@ OtherLinkFlags = ""
TargetDirectory = "$(WorkspaceDir)/dist" TargetDirectory = "$(WorkspaceDir)/dist"
TargetName = "BeefIDE_d2" TargetName = "BeefIDE_d2"
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib BeefySysLib64_d.lib wsock32.lib" OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib BeefySysLib64_d.lib wsock32.lib"
BeefLibType = "DynamicDebug"
DebugCommandArguments = "-proddir=C:\\Beef\\IDE\\mintest" DebugCommandArguments = "-proddir=C:\\Beef\\IDE\\mintest"
DebugWorkingDirectory = "$(ProjectDir)\\dist" DebugWorkingDirectory = "$(ProjectDir)\\dist"
EnvironmentVars = ["_NO_DEBUG_HEAP=1"] EnvironmentVars = ["_NO_DEBUG_HEAP=1"]

View file

@ -1,6 +1,5 @@
FileVersion = 1 FileVersion = 1
Projects = {mintest = {Path = "."}, minlib = {Path = "minlib"}, LibA = {Path = "LibA"}, LibB = {Path = "LibB"}, mintest2 = {Path = "mintest2"}} Projects = {mintest = {Path = "."}, minlib = {Path = "minlib"}, LibA = {Path = "LibA"}, LibB = {Path = "LibB"}, mintest2 = {Path = "mintest2"}}
Locked = ["mintest2"]
[Workspace] [Workspace]
StartupProject = "mintest" StartupProject = "mintest"

View file

@ -1,36 +1,33 @@
using System; using System;
// Zapples
/*class Zlobs : IDisposable
/*class Mintest2
{ {
int IDisposable.Floo()
public static void Main()
{ {
#unwarn
int a = }
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + int Zag()
1 + 1 + 1 + 1 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 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1;
} }
}*/ }*/
class Fligs
{
class Bligs
{
class Snorf
{
}
}
class Zang
{
class Flang
{
}
}
}

View file

@ -34,6 +34,8 @@ namespace Hey.Dude.Bro
{ {
class TestClass class TestClass
{ {
static int gApzong = 123;
[CLink, StdCall] [CLink, StdCall]
public static extern void OutputDebugStringA(char8* str); public static extern void OutputDebugStringA(char8* str);
@ -144,6 +146,18 @@ namespace Hey.Dude.Bro
} }
} }
enum EnumB
{
AAA,
BBB
}
enum EnumC
{
CCC,
DDD
}
static void Flarg() static void Flarg()
{ {
EnumA ea; EnumA ea;
@ -194,13 +208,28 @@ namespace Hey.Dude.Bro
return val.GetHashCode(); return val.GetHashCode();
} }
class Zangles
{
public static int GetMe(Zangles zang, String str)
{
return 99;
}
}
public static int Main(String[] args) public static int Main(String[] args)
{ {
Int i = (.)123;
i = i + i;
Zangles zang = scope .();
Zangles.GetMe(zang, "hey");
TypeCode tc = .Boolean; TypeCode tc = .Boolean;
PrintF("Hey\n"); PrintF("Hey\n");
//Test2(1, 2, 3, 4); Test2(1, 2, 3, 4);
/*IHashable ih = (int32)TypeCode.Boolean; /*IHashable ih = (int32)TypeCode.Boolean;
let hashCode = ih.GetHashCode();*/ let hashCode = ih.GetHashCode();*/
@ -302,5 +331,6 @@ namespace AA
static static
{ {
static int gApsings = 123;
} }

View file

@ -305,25 +305,55 @@ struct Blurg
//int len = str.[Friend]GetLength(); //int len = str.[Friend]GetLength();
} }
static void Test(int a, int b, Span<int> iSpan)
{
}
public static mixin Florf(int a, int b)
{
}
class Zangles
{
public static int GetMe()
{
return 99;
}
}
public static int32 Hey() public static int32 Hey()
{ {
while (true) for (int i < 100)
{ {
Type t = typeof(Yoofer); Yoofer.ColorizeCodeString("abc", .Callstack);
for (let field in t.GetFields())
{
StringView name = field.Name;
}
} }
#unwarn
return (int32)123; return (int32)123;
} }
} }
[Reflect] class Yoofer
struct Yoofer
{ {
int mA; public enum CodeKind
} {
Callstack,
Method,
Field,
Type
}
public static void Zorg()
{
int a = 1;
}
public static void ColorizeCodeString(String label, CodeKind codeKind)
{
Zorg();
int a = 1;
}
}

View file

@ -314,8 +314,6 @@ namespace IDE
public static void ColorizeCodeString(String label, CodeKind codeKind) public static void ColorizeCodeString(String label, CodeKind codeKind)
{ {
//int q = 98;
int prevTypeColor = -1; int prevTypeColor = -1;
int prevStart = -1; int prevStart = -1;
bool foundOpenParen = codeKind != .Callstack; bool foundOpenParen = codeKind != .Callstack;