Skip to content

Commit 9c759fc

Browse files
committed
removed old unit tests. todo: unit tests
1 parent 8a502be commit 9c759fc

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

svelte_blinkenweb/src/core/assemblers.ts

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -132,64 +132,3 @@ export function fasm_diagnostics(str: string): Array<DiagnosticLine>{
132132
}
133133
return diagnostics;
134134
}
135-
136-
// //todo: move to a unit test file
137-
// export function test_gnu_parser(){
138-
// let str, ret;
139-
// //test 1
140-
// str = `
141-
// $ /assembler /assembly.s -o /program.o
142-
// /assembly.s: Assembler messages:
143-
// /assembly.s:14: Error: ambiguous operand size for 'mov'
144-
// `
145-
// ret = fasm_diagnostics(str);
146-
// console.log(ret) //expected: [{line: 14, error: "Error: ambiguous operand size for 'mov'"}]
147-
148-
// //test 2
149-
// str = `
150-
// $ /assembler /assembly.s -o /program.o
151-
// /assembly.s: Assembler messages:
152-
// /assembly.s:9: Error: no such instruction: 'a'
153-
// /assembly.s:14: Error: ambiguous operand size for 'mov'
154-
// /assembly.s:15: Error: number of operands mismatch for 'syscall'
155-
// `
156-
// ret = fasm_diagnostics(str);
157-
// console.log(ret) /* expected: [
158-
// {line: 9, error: "Error: no such instruction: 'a'"}
159-
// {line: 14, error: "Error: ambiguous operand size for 'mov'"}
160-
// {line: 15, error: "Error: number of operands mismatch for 'syscall'"}
161-
// ]
162-
// */
163-
164-
// }
165-
166-
// //todo: move to a unit test file
167-
// export function test_fasm_parser(){
168-
// let str, ret;
169-
// //test 1
170-
// str = `
171-
// $ /assembler /assembly.s /program
172-
// flat assembler version 1.73.32 (16384 kilobytes memory, x64)
173-
// /assembly.s [8]:
174-
// ryt
175-
// processed: ryt
176-
// error: illegal instruction.
177-
178-
// `
179-
// ret = fasm_diagnostics(str);
180-
// console.log(ret) //expected: [{line: 8, error: "error: illegal instruction"}]
181-
182-
// //test 2
183-
// str = `
184-
// $ /assembler /assembly.s /program
185-
// flat assembler version 1.73.32 (16384 kilobytes memory, x64)
186-
// /assembly.s [14]:
187-
// syscall z
188-
// processed: syscall z
189-
// error: extra characters on line.
190-
// `
191-
// ret = fasm_diagnostics(str);
192-
// console.log(ret) //expected: [{line: 14, error: "error: extra characters on line."}]
193-
// }
194-
195-

0 commit comments

Comments
 (0)