예제 #1
0
파일: test_heap.py 프로젝트: hoangt/ms3
 def test_parse(self):
     s = "(heap (id 1)(seed 1)(size 2)(input_port 3)(output_port 4))"
     l = lex.Lexer(mocks.MockFile(s))
     result = benchmarks.parse_benchmark(l)
     self.assertEqual(str(result), s)
예제 #2
0
파일: test_trace.py 프로젝트: hoangt/ms3
 def test_parse(self):
     s = "(trace (id 3)(name test))"
     l = lex.Lexer(mocks.MockFile(s))
     result = benchmarks.parse_benchmark(l)
     self.assertEqual(str(result), s)
예제 #3
0
파일: test_qsort.py 프로젝트: hoangt/ms3
 def test_parse(self):
     s = "(qsort (id 9)(seed 3)(size 16)(input_port 1)(output_port 2))"
     l = lex.Lexer(mocks.MockFile(s))
     result = benchmarks.parse_benchmark(l)
     self.assertEqual(str(result), s)
예제 #4
0
파일: test_maze.py 프로젝트: hoangt/ms3
 def test_parse(self):
     s = "(maze (id 1)(seed 1)(width 2)(height 3))"
     l = lex.Lexer(mocks.MockFile(s))
     result = benchmarks.parse_benchmark(l)
     self.assertEqual(str(result), s)
예제 #5
0
파일: model.py 프로젝트: hoangt/ms3
def _parse_benchmarks(lexer):
    bms = []
    while lexer.get_type() == lex.TOKEN_OPEN:
        bms.append(benchmarks.parse_benchmark(lexer))
    return bms
예제 #6
0
파일: test_hash.py 프로젝트: hoangt/ms3
 def test_parse(self):
     s = "(hash (id 2)(seed 3)(count 10)(input_port 5)(output_port 6))"
     l = lex.Lexer(mocks.MockFile(s))
     result = benchmarks.parse_benchmark(l)
     self.assertEqual(str(result), s)