diff --git a/vlib/toml/tests/encode_and_decode_test.v b/vlib/toml/tests/encode_and_decode_test.v index 39fcca3365..554b668738 100644 --- a/vlib/toml/tests/encode_and_decode_test.v +++ b/vlib/toml/tests/encode_and_decode_test.v @@ -77,8 +77,9 @@ pub fn (mut e Employee) from_toml(any toml.Any) { mp := any.as_map() e.name = mp['name'] or { toml.Any('') }.string() e.age = mp['age'] or { toml.Any(0) }.int() - e.salary = mp['salary'] or { toml.Any(0) }.f32() - 15000.0 e.is_human = mp['is_human'] or { toml.Any(false) }.bool() + // Change some values to assert that the structs method is used instead of generic decoding. + e.salary = mp['salary'] or { toml.Any(0) }.f32() - 15000.0 e.title = unsafe { JobTitle(mp['title'] or { toml.Any(0) }.int() - 2) } }