When grading assignment 3, commands and files like the following will be used.
Make sure your code output is perfect or else you could lose points!!
timeout 1 ./memsim -m 2e hello.in 2>&1 | head -n 1000 > hello.run
diff hello.out hello.run
timeout 1 ./memsim -m0x30 test2.in 2>&1 | head -n 1000 > test2.run
diff test2.out test2.run
timeout 1 ./memsim -m 30 test3.in 2>&1 | head -n 1000 > test3-30.run
diff test3-30.out test3-30.run
timeout 1 ./memsim -m 200 test3.in 2>&1 | head -n 5000 > test3-200.run
diff test3-200.out test3-200.run
main()
test code to run without warnings:timeout 1 ./memsim -m1010 test3.in 2>&1 | head -n 5000 > test3-1010.run
diff test3-1010.out test3-1010.run
timeout 1 ./memsim testsx.in 2>&1 | head -n 5000 > testsx.run
diff testsx.out testsx.run
Here are the test files corresponding to the above commands:
You will want to right-click on these files and then 'save file as...'
It should be obvious that if you can't see the difference between your
output and the reference output file then 1) you are wrong and 2) you need to use
hexdump -C
on your output file and look to see if there is junk bytes in
your output that don't print on your screen.
Last modified: 2022-08-18 13:52:50 CDT