diff --git a/src/js/trove/global.js b/src/js/trove/global.js index e68c12f5ee..8acdc742ac 100644 --- a/src/js/trove/global.js +++ b/src/js/trove/global.js @@ -54,19 +54,31 @@ "current-checker": ["arrow", [], ["record", { "run-checks": "tbot", "check-is": "tbot", - "check-is-not": "tbot", + "check-is-cause": "tbot", "check-is-roughly": "tbot", + "check-is-roughly-cause": "tbot", + "check-is-not": "tbot", + "check-is-not-cause": "tbot", "check-is-refinement": "tbot", + "check-is-refinement-cause": "tbot", "check-is-not-refinement": "tbot", - "check-satisfies": "tbot", + "check-is-not-refinement-cause": "tbot", + "check-satisfies": "tbot", // doesn't have -cause + "check-satisfies-not": "tbot", // doesn't have -cause "check-satisfies-delayed": "tbot", - "check-satisfies-not": "tbot", + "check-satisfies-delayed-cause": "tbot", "check-satisfies-not-delayed": "tbot", + "check-satisfies-not-delayed-cause": "tbot", "check-raises-str": "tbot", - "check-raises-not": "tbot", + "check-raises-str-cause": "tbot", "check-raises-other-str": "tbot", + "check-raises-other-str-cause": "tbot", + "check-raises-not": "tbot", + "check-raises-not-cause": "tbot", "check-raises-satisfies": "tbot", - "check-raises-violates": "tbot" + "check-raises-satisfies-cause": "tbot", + "check-raises-violates": "tbot", + "check-raises-violates-cause": "tbot" }]] }], diff --git a/tests/type-check/should/obj-fun-check.arr b/tests/type-check/good/obj-fun-check.arr similarity index 100% rename from tests/type-check/should/obj-fun-check.arr rename to tests/type-check/good/obj-fun-check.arr diff --git a/tests/type-check/should/obj-lub.arr b/tests/type-check/good/obj-lub.arr similarity index 100% rename from tests/type-check/should/obj-lub.arr rename to tests/type-check/good/obj-lub.arr diff --git a/tests/type-check/good/tests-because.arr b/tests/type-check/good/tests-because.arr new file mode 100644 index 0000000000..437aca1677 --- /dev/null +++ b/tests/type-check/good/tests-because.arr @@ -0,0 +1,43 @@ +check: + fun less-than(l :: Number, r :: Number): l < r end + fun is-even(n :: Number): num-modulo(n, 2) == 0 end + + 67 is 67 + 67 is 67 because 67 + + ~0.0000001 is-roughly ~0.0000002 + ~0.0000001 is-roughly ~0.0000002 because ~0.0000001 + + 67 is-not 69 + 67 is-not 69 because 67 + + 67 is%(less-than) 69 + 67 is%(less-than) 69 because 67 + + 69 is-not%(less-than) 67 + 69 is-not%(less-than) 67 because 69 + + 67 + 1 satisfies is-even + 67 + 1 satisfies is-even because 68 + + 70 - 1 violates is-even + 70 - 1 violates is-even because 69 + + raise("err") raises "err" + raise("err") raises "err" because raise("err") + + raise("foo") raises-other-than "bar" + raise("foo") raises-other-than "bar" because raise("foo") + + 67 does-not-raise + 67 does-not-raise because 67 + + fun is-foo(x :: Any): x == "foo" end + + raise("foo") raises-satisfies is-foo + raise("foo") raises-satisfies is-foo because raise("foo") + + raise("bar") raises-violates is-foo + raise("bar") raises-violates is-foo because raise("bar") +end +