Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
tao1122334 committed Jan 13, 2024
2 parents 1e7fe5f + 9e3b8d4 commit ac139be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions phase4/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
subprocess.run(f'../bin/splc {id}.ir', shell=True)
for test in tests.read().split('\n\n'):
input, expect_out = test.split('\n----------\n')
input=input.replace(' ','\\n')
if '\\n' in input:
input=input+'\\n'
input=input.replace(' ','\n')
actual_out = (subprocess.run(f'echo "{input}" | spim -file {id}.s', shell=True, capture_output=True, text=True).stdout
.replace(spim_header, '') # remove SPIM's header
.replace(input_prompt,'') # remove input prompt
Expand Down
7 changes: 7 additions & 0 deletions phase4/test/test_4_r12.test
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
1 1
----------
1
1

2 2
----------
2
2

10 15
----------
5
5

12 8
----------
4
4

16 40
----------
8
8

114514 37
----------
1
1

333 407
----------
37
37

0 comments on commit ac139be

Please sign in to comment.