Skip to content

Commit

Permalink
Some consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
ZippeyKeys12 committed Aug 4, 2018
1 parent 8e7e171 commit 817e903
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/ZSCRIPT/CLEMATIS/CLEMATIS.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ class Clematis abstract{
..Failures+Successes.." Tests Run, "..Successes.." Tests Succeeded, "..Failures.." Test Failed".."\n");
}

void It(Name TestCaseName, bool Condition, ZE_ErrorSeverity Severity)
void It(Name TestCaseName, bool Condition, Cl_EErrorSeverity Severity)
{Results.Push(Cl_Result.Create(TestCaseName, Condition, Severity));}

/////////////
// Logging //
/////////////

void Log(ZE_ErrorSeverity Severity, String Error, bool Verbose=false){
void Log(Cl_EErrorSeverity Severity, String Error, bool Verbose=false){
if(!Verbose || Logging)
ZDebug.Error(GetClassName(), Error, Severity);
Cl_Debug.Error(GetClassName(), Error, Severity);
}
}
4 changes: 2 additions & 2 deletions src/ZSCRIPT/CLEMATIS/DATA.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ class Cl_Result{

Name Name;

ZE_ErrorSeverity Severity;
Cl_EErrorSeverity Severity;

static
Cl_Result Create(Name Name, bool Success, ZE_ErrorSeverity Severity){
Cl_Result Create(Name Name, bool Success, Cl_EErrorSeverity Severity){
Cl_Result Result=new('Cl_Result');
Result.Name=Name;
Result.Success=Success;
Expand Down
12 changes: 7 additions & 5 deletions src/ZSCRIPT/CLEMATIS/DEBUG.zsc
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
enum ZE_ErrorSeverity{
enum Cl_EErrorSeverity{
ERR_Info,
ERR_Warning,
ERR_Error,
ERR_Fatal,
}

class ZDebug{
class Cl_Debug{
static
clearscope
void Message(String Output, Name CVarName)
{if(CVar.FindCVar(CVarName).GetBool())console.printf(Output);}
void Message(String Output, Name CVarName){
if(CVar.FindCVar(CVarName).GetBool())
console.printf(Output);
}

static
clearscope
void Error(Name Owner, String Error, ZE_ErrorSeverity Severity){
void Error(Name Owner, String Error, Cl_EErrorSeverity Severity){
switch(Severity){
case ERR_Info:
Console.PrintF("%s INFO - %s", "["..Owner.."]", Error);
Expand Down

0 comments on commit 817e903

Please sign in to comment.