mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 07:43:13 +00:00
Improve system_exec_command_line_app functionality; Restrict test_* procedures to *_test.odin files
This commit is contained in:
@@ -1864,10 +1864,14 @@ void generate_minimum_dependency_set(Checker *c, Entity *start) {
|
||||
if (e->kind != Entity_Procedure) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (e->file == nullptr || !e->file->is_test) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String name = e->token.string;
|
||||
String prefix = str_lit("test_");
|
||||
|
||||
|
||||
if (!string_starts_with(name, prefix)) {
|
||||
continue;
|
||||
}
|
||||
@@ -1876,9 +1880,7 @@ void generate_minimum_dependency_set(Checker *c, Entity *start) {
|
||||
if (name != prefix) {
|
||||
is_tester = true;
|
||||
} else {
|
||||
if (e->file && e->file->is_test) {
|
||||
error(e->token, "Invalid testing procedure name: %.*s", LIT(name));
|
||||
}
|
||||
error(e->token, "Invalid testing procedure name: %.*s", LIT(name));
|
||||
}
|
||||
|
||||
Type *t = base_type(e->type);
|
||||
|
||||
Reference in New Issue
Block a user