コード例 #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)