Haxe
#
StatusBeta
#
Versions4.0
#
Test Frameworks#
Examplesrc/Solution.hx
class Example {
public static function add(a:Int, b:Int):Int {
return a + b;
}
}
tests/SolutionTest.hx
import utest.Assert;
import Solution;
class SolutionTest extends utest.Test {
function testExample() {
Assert.equals(2, Example.add(1, 1));
}
}
The name of the test class must be SolutionTest
.
The optional preloaded code is a separate module (src/Preloaded.hx
) that you can import.
#
Timeout12 seconds
#
PackagesNone
#
ServicesNone
#
Language IDhaxe