#Tests in the Gleam compiler

1 messages · Page 1 of 1 (latest)

hidden stirrup
#

I've finally found the time to work on this issue https://github.com/gleam-lang/gleam/issues/2243 and I think I might have fixed it! The problem is, I'm having a hard time figuring out where I should put the different tests.

For example I've added a test to compiler_core/src/type_/tests/assignments to check the variable assigned with the pattern is actually inferred to be a string. However, I would like to add more test cases with complex patterns inside the branches of a case to check that everything is working as expected. Where should I put such tests?

GitHub

When pattern matching on strings using <> it seems it's not possible to assign names to sub patterns: pub fn main() { case "foo" { "1" as digit <> rest -> tod...

crimson ginkgo
#

Check out javascript/tests and erlang/tests