Update tests to use .bend extension, fix test uite

This commit is contained in:
Nicolas Abril 2024-05-15 00:25:46 +02:00
parent a0c1ea4bd5
commit e1dd23d96c
848 changed files with 607 additions and 1010 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/target
*.snap.new
.out.hvm

View File

@ -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.

View File

@ -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:
}

View File

@ -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();

View File

@ -1,3 +1,3 @@
gen-hvm
tests/golden_tests/cli/compile_all.hvm
tests/golden_tests/cli/compile_all.bend
-Oall

View File

@ -1,3 +1,3 @@
gen-hvm
tests/golden_tests/cli/compile_inline.hvm
tests/golden_tests/cli/compile_inline.bend
-Oinline

View File

@ -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

View File

@ -1,3 +1,3 @@
gen-hvm
tests/golden_tests/cli/compile_pre_reduce.hvm
tests/golden_tests/cli/compile_pre_reduce.bend
-Opre-reduce

View File

@ -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

View File

@ -1,3 +1,3 @@
gen-hvm
tests/golden_tests/cli/compile_wrong_opt.hvm
tests/golden_tests/cli/compile_wrong_opt.bend
-Ofoo

View File

@ -1,5 +1,5 @@
run
tests/golden_tests/cli/debug_list_map.hvm
tests/golden_tests/cli/debug_list_map.bend
-d
-L
-1

View File

@ -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

View File

@ -1,3 +1,3 @@
desugar
tests/golden_tests/cli/desugar_bool_scott.hvm
tests/golden_tests/cli/desugar_bool_scott.bend
-Oadt-scott

View File

@ -1,3 +0,0 @@
desugar
tests/golden_tests/cli/desugar_bool_tagged.hvm
-Oadt-tagged-scott

View File

@ -1,3 +0,0 @@
data Boolean = True | False
main = Boolean/True

View File

@ -1,3 +1,3 @@
desugar
tests/golden_tests/cli/desugar_float_combinators.hvm
tests/golden_tests/cli/desugar_float_combinators.bend
-Ofloat-combinators

View File

@ -1,3 +1,3 @@
desugar
tests/golden_tests/cli/desugar_linearize_matches.hvm
tests/golden_tests/cli/desugar_linearize_matches.bend
-Olinearize-matches

View File

@ -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

View File

@ -1,3 +1,3 @@
desugar
tests/golden_tests/cli/desugar_merge.hvm
tests/golden_tests/cli/desugar_merge.bend
-Omerge

View File

@ -1,3 +1,3 @@
desugar
tests/golden_tests/cli/desugar_prune.hvm
tests/golden_tests/cli/desugar_prune.bend
-Oprune

View File

@ -1,4 +1,4 @@
run
tests/golden_tests/cli/run_add.hvm
tests/golden_tests/cli/run_add.bend
3
6

View File

@ -1,3 +1,3 @@
run
tests/golden_tests/cli/run_pretty.hvm
tests/golden_tests/cli/run_pretty.bend
-p

View File

@ -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