mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
toml: use toml.parse_text and toml.parse_file in the tests
This commit is contained in:
@@ -3,7 +3,7 @@ import toml
|
||||
fn test_default_to() {
|
||||
default_value := 4321
|
||||
mut toml_txt := 'var = 1234'
|
||||
toml_doc := toml.parse(toml_txt) or { panic(err) }
|
||||
toml_doc := toml.parse_text(toml_txt) or { panic(err) }
|
||||
value := toml_doc.value('tar').default_to(default_value).int()
|
||||
assert value == default_value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user