amber-lang/amber

[Feature] Migrate validity.rs test to pure Amber files

Closed this issue · 5 comments

Like as we did for stdlib also that file need that "cure".

After the merge of #291 we can work also on this one.

@Mte90 I disagree. The validity tests are for compiler developers. They already know how rust works and probably expect something that is more idiomatic to Rust projects.

I also don't see the reason to do that - also because testing stdlib now takes forever (like 2-5 minutes) when we have separated the files out. And the validity completes in 5 seconds

b1ek commented

also because testing stdlib now takes forever

its a synchronous testing issue. cargo test by default splits them out to multiple threads, and we can split them out into different threads with little to no effort

also because testing stdlib now takes forever

its a synchronous testing issue. cargo test by default splits them out to multiple threads, and we can split them out into different threads with little to no effort

We can do that. But I still don’t understand why should de separate the validity tests

Because we are talking about a new language, with tests inside a Rust files it is required to escape everything, the readability is bad.
Also when the editor will support Amber language with various files it will be more easier to manage them, also it is more faster to add new tests with creating files.

PHP, PYthon and other languages doesn't include this tests in C files as example https://github.com/php/php-src/tree/master/tests/func

Okay then. But the PR should also improve the performance of the tests as well