BREAKING: More units of measure work and keyword args (#6291)
* More units of measure work Signed-off-by: Nick Cameron <nrc@ncameron.org> * Update CSG output since engine change --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -3876,6 +3876,23 @@ mySk1 = startSketchOn(XY)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_numeric() {
|
||||
let test_program = "fn foo(x: number(Length)) {}";
|
||||
let tokens = crate::parsing::token::lex(test_program, ModuleId::default()).unwrap();
|
||||
run_parser(tokens.as_slice()).unwrap();
|
||||
|
||||
let test_program = "42_mm";
|
||||
let tokens = crate::parsing::token::lex(test_program, ModuleId::default()).unwrap();
|
||||
assert_eq!(tokens.iter().count(), 1);
|
||||
run_parser(tokens.as_slice()).unwrap();
|
||||
|
||||
let test_program = "42_Length";
|
||||
let tokens = crate::parsing::token::lex(test_program, ModuleId::default()).unwrap();
|
||||
assert_eq!(tokens.iter().count(), 2);
|
||||
assert_eq!(run_parser(tokens.as_slice()).unwrap_errs().count(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parameter_list() {
|
||||
let tests = [
|
||||
|
Reference in New Issue
Block a user