Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you have not already done so, please read this introduction to silUnit. For our first test case, create a routine function sayHello() which simply returns the string "hello". 

...

Step 1 - Create a Basic Test

Our routine function below is fairly simple. We create a function, itSaysHello(), and place the "/** TEST **/" annotation above so that the silUnit recognizes it as a test. 

Code Block
include "Includes/_silUnit.incl";
include "hello.sil";
 
 
/** TEST **/
function itSaysHello() {
    assertEquals(sayHello(), "hello");
}

Step 2 - Create a

...

Function Which Causes the Test to Fail

Returning "not hello" would definitely not be saying hello!

...