Skip to content

Commit

Permalink
V2
Browse files Browse the repository at this point in the history
  • Loading branch information
ZippeyKeys12 committed Nov 18, 2018
1 parent 8873fe7 commit 7d4fe5a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ class ClematisExample:Clematis{
override
void TestSuites(){
Describe('Testing Player Stats');
It('MaxHealth', 90>100, ERR_Warning);
It('Math', 1+1==2, ERR_Fatal);
It('MaxHealth', AssertEval(MaxHealth, '<', 100), LOG_Warning);
It('Math', AssertEval(1+1, '==', 2), LOG_Fatal);
It('Woot', AssertTrue(exampleBool), LOG_Fatal);
EndDescribe();

Describe('Testing Math');
It('Calculus', 0*1!=0, ERR_Error);
It('Math', 1+2==2, ERR_Warning);
It('Calculus', AssertFalse(0*1!=0), ERR_Error);
It('Math', AssertSame(Pointer1, Pointer2, "Custom error mesage"), ERR_Warning);
EndDescribe();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ZSCRIPT/CLEMATIS/ASSERTIONS/BOOLEAN/FALSE.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Cl_AssertFalse:Cl_Assertion{

extend
class Clematis{
Cl_Assertion AssertFalse(bool Condition)
{return Cl_AssertFalse.Create(Condition);}
Cl_Assertion AssertFalse(bool Condition, String ErrorMsg="")
{return Cl_AssertFalse.Create(Condition, ErrorMsg);}
}
4 changes: 2 additions & 2 deletions src/ZSCRIPT/CLEMATIS/ASSERTIONS/BOOLEAN/TRUE.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Cl_AssertTrue:Cl_Assertion{

extend
class Clematis{
Cl_Assertion Assert(bool Condition)
{return Cl_AssertTrue.Create(Condition);}
Cl_Assertion Assert(bool Condition, String ErrorMsg="")
{return Cl_AssertTrue.Create(Condition, ErrorMsg);}
}
4 changes: 2 additions & 2 deletions src/ZSCRIPT/CLEMATIS/ASSERTIONS/NUMBER/EVAL.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class Cl_AssertEval:Cl_Assertion{

extend
class Clematis{
Cl_Assertion AssertEval(double Val1, String Operator, double Val2)
{return Cl_AssertEval.Create(Val1, Operator, Val2);}
Cl_Assertion AssertEval(double Val1, String Operator, double Val2, String ErrorMsg="")
{return Cl_AssertEval.Create(Val1, Operator, Val2, ErrorMsg);}
}
4 changes: 2 additions & 2 deletions src/ZSCRIPT/CLEMATIS/ASSERTIONS/OBJECT/NOTNULL.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Cl_AssertNotNull:Cl_Assertion{

extend
class Clematis{
Cl_Assertion AssertNotNull(Object Value)
{return Cl_AssertNotNull.Create(Value);}
Cl_Assertion AssertNotNull(Object Value, String ErrorMsg="")
{return Cl_AssertNotNull.Create(Value, ErrorMsg);}
}
4 changes: 2 additions & 2 deletions src/ZSCRIPT/CLEMATIS/ASSERTIONS/OBJECT/NULL.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Cl_AssertNull:Cl_Assertion{

extend
class Clematis{
Cl_Assertion AssertNull(Object Value)
{return Cl_AssertNull.Create(Value);}
Cl_Assertion AssertNull(Object Value, String ErrorMsg="")
{return Cl_AssertNull.Create(Value, ErrorMsg);}
}
4 changes: 2 additions & 2 deletions src/ZSCRIPT/CLEMATIS/ASSERTIONS/OBJECT/SAME.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class Cl_AssertSame:Cl_Assertion{

extend
class Clematis{
Cl_Assertion AssertSame(Object Val1, Object Val2)
{return Cl_AssertSame.Create(Val1, Val2);}
Cl_Assertion AssertSame(Object Val1, Object Val2, String ErrorMsg="")
{return Cl_AssertSame.Create(Val1, Val2, ErrorMsg);}
}
5 changes: 3 additions & 2 deletions src/ZSCRIPT/CLEMATIS/CLEMATIS.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ class Clematis abstract{
void TestSuites(){
/* Example
* Describe('Testing Player Stats');
* It('MaxHealth', MaxHealth<100, LOG_Warning);
* It('Math', 1+1==2, LOG_Fatal);
* It('MaxHealth', AssertEval(MaxHealth, '<', 100), LOG_Warning);
* It('Math', AssertEval(1+1, '==', 2), LOG_Fatal);
* It('Woot', AssertTrue(exampleBool), LOG_Fatal);
* EndDescribe();
*/
}
Expand Down

0 comments on commit 7d4fe5a

Please sign in to comment.