You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bail!("Didn't find any `// TODO` comment in the file `{path}`.\nYou need to have at least one such comment to guide the user.");
98
98
}
99
99
100
-
if !exercise_info.test && file_buf.contains("#[test]\n"){
100
+
let contains_tests = file_buf.contains("#[test]\n");
101
+
if exercise_info.test{
102
+
if !contains_tests {
103
+
bail!("The file `{path}` doesn't contain any tests. If you don't want to add tests to this exercise, set `test = false` for this exercise in the `info.toml` file");
104
+
}
105
+
}elseif contains_tests {
101
106
bail!("The file `{path}` contains tests annotated with `#[test]` but the exercise `{name}` has `test = false` in the `info.toml` file");
0 commit comments