mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-08-15 14:50:42 +03:00
Update tests to use .bend extension, fix test uite
This commit is contained in:
parent
a0c1ea4bd5
commit
e1dd23d96c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/target
|
||||
*.snap.new
|
||||
.out.hvm
|
@ -1,7 +1,5 @@
|
||||
# Bend
|
||||
|
||||
_Note: The latest version of Bend targets an unreleased version of HVM. If you want to use Bend right now, use branch [hvm-core](https://github.com/HigherOrderCO/bend/tree/hvm-core)_.
|
||||
|
||||
Bend is a programming language that can run massively parallel programs on the GPU or the CPU using the power of interaction nets and the [HVM](https://github.com/HigherOrderCO/hvm).
|
||||
With Bend, you can write programs for the GPU as easily as you'd write a normal program in your favorite language.
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
data Tree = (node ~lft ~rgt) | (leaf val)
|
||||
|
||||
(MergeSort tree) = fold tree {
|
||||
Tree/node: (merge tree.lft tree.rgt)
|
||||
Tree/leaf: tree
|
||||
}
|
||||
|
||||
(Merge (Tree/leaf a) (Tree/leaf b)) =
|
||||
let (a, b) = if (<= a b) { (a, b) } else { (b, a) }
|
||||
(Tree/node (Tree/leaf a) (Tree/leaf b))
|
||||
|
||||
|
||||
(concat a b) = match a {
|
||||
List/cons:
|
||||
}
|
@ -69,7 +69,7 @@ fn run_golden_test_dir_multiple(test_name: &str, run: &[&RunFn]) {
|
||||
|
||||
let walker = WalkDir::new(&root).sort_by_file_name().max_depth(2).into_iter().filter_entry(|e| {
|
||||
let path = e.path();
|
||||
path == root || path.is_dir() || (path.is_file() && path.extension().is_some_and(|x| x == "hvm"))
|
||||
path == root || path.is_dir() || (path.is_file() && path.extension().is_some_and(|x| x == "bend"))
|
||||
});
|
||||
|
||||
for entry in walker {
|
||||
@ -407,7 +407,7 @@ fn examples() -> Result<(), Diagnostics> {
|
||||
.min_depth(1)
|
||||
.into_iter()
|
||||
.filter_map(|e| e.ok())
|
||||
.filter(|e| e.path().extension().map_or(false, |ext| ext == "hvm"))
|
||||
.filter(|e| e.path().extension().map_or(false, |ext| ext == "bend"))
|
||||
{
|
||||
let _guard = RUN_MUTEX.lock().unwrap();
|
||||
let path = entry.path();
|
||||
|
@ -1,3 +1,3 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/compile_all.hvm
|
||||
tests/golden_tests/cli/compile_all.bend
|
||||
-Oall
|
||||
|
@ -1,3 +1,3 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/compile_inline.hvm
|
||||
tests/golden_tests/cli/compile_inline.bend
|
||||
-Oinline
|
||||
|
@ -1,9 +1,8 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/compile_no_opts.hvm
|
||||
tests/golden_tests/cli/compile_no_opts.bend
|
||||
-Ono-all
|
||||
-Ono-eta
|
||||
-Ono-prune
|
||||
-Ono-pre-reduce
|
||||
-Ono-float-combinators
|
||||
-Ono-merge
|
||||
-Ono-inline
|
||||
|
@ -1,3 +1,3 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/compile_pre_reduce.hvm
|
||||
tests/golden_tests/cli/compile_pre_reduce.bend
|
||||
-Opre-reduce
|
||||
|
@ -1,4 +1,4 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/compile_strict_loop.hvm
|
||||
tests/golden_tests/cli/compile_strict_loop.bend
|
||||
-Ono-all
|
||||
-Arecursion-cycle
|
||||
|
@ -1,3 +1,3 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/compile_wrong_opt.hvm
|
||||
tests/golden_tests/cli/compile_wrong_opt.bend
|
||||
-Ofoo
|
||||
|
@ -1,5 +1,5 @@
|
||||
run
|
||||
tests/golden_tests/cli/debug_list_map.hvm
|
||||
tests/golden_tests/cli/debug_list_map.bend
|
||||
-d
|
||||
-L
|
||||
-1
|
||||
|
@ -1,4 +1,4 @@
|
||||
run
|
||||
tests/golden_tests/cli/debug_u60_to_nat.hvm
|
||||
tests/golden_tests/cli/debug_u60_to_nat.bend
|
||||
-d
|
||||
4
|
||||
|
@ -1,3 +1,3 @@
|
||||
desugar
|
||||
tests/golden_tests/cli/desugar_bool_scott.hvm
|
||||
tests/golden_tests/cli/desugar_bool_scott.bend
|
||||
-Oadt-scott
|
||||
|
@ -1,3 +0,0 @@
|
||||
desugar
|
||||
tests/golden_tests/cli/desugar_bool_tagged.hvm
|
||||
-Oadt-tagged-scott
|
@ -1,3 +0,0 @@
|
||||
data Boolean = True | False
|
||||
|
||||
main = Boolean/True
|
@ -1,3 +1,3 @@
|
||||
desugar
|
||||
tests/golden_tests/cli/desugar_float_combinators.hvm
|
||||
tests/golden_tests/cli/desugar_float_combinators.bend
|
||||
-Ofloat-combinators
|
||||
|
@ -1,3 +1,3 @@
|
||||
desugar
|
||||
tests/golden_tests/cli/desugar_linearize_matches.hvm
|
||||
tests/golden_tests/cli/desugar_linearize_matches.bend
|
||||
-Olinearize-matches
|
||||
|
@ -1,3 +1,3 @@
|
||||
desugar
|
||||
tests/golden_tests/cli/desugar_linearize_matches_alt.hvm
|
||||
tests/golden_tests/cli/desugar_linearize_matches_alt.bend
|
||||
-Olinearize-matches-alt
|
||||
|
@ -1,3 +1,3 @@
|
||||
desugar
|
||||
tests/golden_tests/cli/desugar_merge.hvm
|
||||
tests/golden_tests/cli/desugar_merge.bend
|
||||
-Omerge
|
||||
|
@ -1,3 +1,3 @@
|
||||
desugar
|
||||
tests/golden_tests/cli/desugar_prune.hvm
|
||||
tests/golden_tests/cli/desugar_prune.bend
|
||||
-Oprune
|
||||
|
@ -1,4 +1,4 @@
|
||||
run
|
||||
tests/golden_tests/cli/run_add.hvm
|
||||
tests/golden_tests/cli/run_add.bend
|
||||
3
|
||||
6
|
||||
|
@ -1,3 +1,3 @@
|
||||
run
|
||||
tests/golden_tests/cli/run_pretty.hvm
|
||||
tests/golden_tests/cli/run_pretty.bend
|
||||
-p
|
||||
|
@ -1,2 +1,2 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/warn_and_err.hvm
|
||||
tests/golden_tests/cli/warn_and_err.bend
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user