-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.ts
37 lines (22 loc) · 827 Bytes
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import test from 'ava';
import Program from "./src/parse/ast/Program";
// @ts-ignore
import execution_time from "execution-time";
import Loader from "./src/util/loader";
const perf = execution_time();
// passing
let fileNames: Array<string> = [];
let testStrings: Array<string> = [];
let testCases: Array<Program> = [];
let ProgramLoader = new Loader();
test.before('Initialize and Compile Test Cases', t => {
let results;
perf.start();
ProgramLoader.loadProgramsFromDirectory(Loader.TEST_PROGRAM_DIR);
results = perf.stop();
t.log(`Initialized ${ProgramLoader.getProgramList().length} test cases in ${results.time.toFixed(1)} ms`)
});
test('Successfully Loaded Programs', t => {
t.assert(ProgramLoader.getProgramList().length > 0);
});
// test.todo('Actually Test `should-fail` cases');