cob: split up typename tests

The test name being used is `valid_typenames`, however it tests for
invalid `TypeName`s as well.

The invalid `TypeName` tests are now separated into another test
called `invalid_typenames`.
This commit is contained in:
Fintan Halpenny 2026-02-03 11:37:10 +00:00 committed by Lorenz Leutgeb
parent 204db22bbe
commit fe09cd4a00
1 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,10 @@ mod test {
assert!(TypeName::from_str("abc.123.ghi").is_ok());
assert!(TypeName::from_str("1bc.123.ghi").is_ok());
assert!(TypeName::from_str("1bc-123.ghi").is_ok());
}
#[test]
fn invalid_typenames() {
assert!(TypeName::from_str("").is_err());
assert!(TypeName::from_str(".").is_err());
assert!(TypeName::from_str(".abc.123.ghi").is_err());