-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Populate errortype on more errors (#201)
- Added unreachable_code, proc_has_no_parent, and loop_condition_determinate error types. - Added one use of control_condition_static where it was missing. - Added unit tests covering some of the error conditions I looked at while adding these.
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
extern crate dreamchecker as dc; | ||
|
||
use dc::test_helpers::check_errors_match; | ||
|
||
pub const NO_PARENT_ERRORS: &[(u32, u16, &str)] = &[ | ||
(2, 5, "proc has no parent: /mob/proc/test"), | ||
]; | ||
|
||
#[test] | ||
fn no_parent() { | ||
let code = r##" | ||
/mob/proc/test() | ||
..() | ||
return | ||
"##.trim(); | ||
check_errors_match(code, NO_PARENT_ERRORS); | ||
} |