mirror of
https://github.com/anoma/juvix.git
synced 2024-12-14 17:32:00 +03:00
336a934d18
* Closes #2032. * Adds the `juvix dev core normalize` command. * Adds the `:n` command in JuvixCore REPL. * Adds the `--normalize` flag to `juvix dev core read` and `juvix dev core from-concrete`. * Adds `pipeline-normalize` which denotes pipeline steps necessary before normalization. * Adds normalization tests in `tests/VampIR/positive/Core`.
85 lines
1.4 KiB
YAML
85 lines
1.4 KiB
YAML
working-directory: ./../../../../tests
|
|
|
|
tests:
|
|
- name: core-from-concrete-eval
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- core
|
|
- from-concrete
|
|
- --eval
|
|
args:
|
|
- positive/Internal/LiteralInt.juvix
|
|
stdout: |
|
|
suc (suc zero)
|
|
exit-status: 0
|
|
|
|
- name: core-from-concrete-eval
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- core
|
|
- from-concrete
|
|
- --eval
|
|
- --transforms
|
|
- nat-to-primint
|
|
args:
|
|
- positive/Internal/LiteralInt.juvix
|
|
stdout: |
|
|
2
|
|
exit-status: 0
|
|
|
|
- name: core-from-concrete-eval-s
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- core
|
|
- from-concrete
|
|
- --eval
|
|
- --symbol-name
|
|
- f
|
|
args:
|
|
- positive/Internal/LiteralInt.juvix
|
|
stdout: |
|
|
suc zero
|
|
exit-status: 0
|
|
|
|
- name: core-repl-normalize
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- core
|
|
- repl
|
|
stdin: ":n λ(x : Int) (λ(y : Int) y + 2) x"
|
|
stdout:
|
|
contains: |
|
|
λ(x : Int) + x 2
|
|
exit-status: 0
|
|
|
|
- name: core-from-concrete-normalize
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- core
|
|
- from-concrete
|
|
- --normalize
|
|
args:
|
|
- positive/Internal/Norm.juvix
|
|
stdout: |
|
|
suc (suc (suc zero))
|
|
exit-status: 0
|
|
|
|
- name: core-read-normalize
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- core
|
|
- read
|
|
- --normalize
|
|
args:
|
|
- Core/positive/test058.jvc
|
|
stdout:
|
|
contains: |
|
|
5
|
|
exit-status: 0
|