Skip to content
Snippets Groups Projects
Commit 354b5672 authored by Rolf Glomsrud's avatar Rolf Glomsrud
Browse files

Removed tests.ts

parent a894b3ff
No related branches found
No related tags found
No related merge requests found
{
"name": "INF222_O2",
"name": "INF222-Obligatory2-Skeleton",
"lockfileVersion": 3,
"requires": true,
"packages": {
......
import { interpret } from "./interpreter";
const tests = {
testPlus: () => {
let code = "let a = 1[kg] + 2 [kg]";
try {
let resultingEnv = interpret(code);
console.assert(
resultingEnv.env.get("a")?.unit.value === "m" &&
resultingEnv.env.get("a")?.value === 3
);
} catch {
console.log("Failed simple plus statement");
}
},
testMinus: () => {},
testLeftAssociativity: () => {},
testParenthesis: () => {},
testMultiplication: () => {},
testDivision: () => {},
};
export function runTests() {
tests.testPlus();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment