Skip to content

Commit

Permalink
Add basic tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
CensoredUsername committed Dec 12, 2024
1 parent f7d1fe1 commit c0524e9
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
command: check

test:
name: Test Suite
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -30,3 +30,29 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test

validate:
name: Run testcases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build --release --
- name: Test assembling
run: |
cargo run --release -- testcases/assembly_basic_instructions.wsa -t -f asm -o testcases/assembly_basic_instructions.2.ws
diff -u testcases/assembly_basic_instructions.ws testcases/assembly_basic_instructions.2.ws
- name: Test disassembling
run: |
cargo run --release -- testcases/assembly_basic_instructions.ws -t -f ws -o testcases/assembly_basic_instructions.2.wsa
diff -u testcases/assembly_basic_instructions.wsa testcases/assembly_basic_instructions.2.wsa
- name: Test running a known working whitespace program
run: |
cargo run --release -- testcases/big-quine.ws -o testcases/big-quine.2.ws
diff -u testcases/big-quine.ws testcases/big-quine.2.ws

0 comments on commit c0524e9

Please sign in to comment.