Skip to content

Commit

Permalink
Test setting/getting properties through nested dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosichert committed Apr 24, 2024
1 parent eacb790 commit 9440e4e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/webidl-tests/dictionary.rs
Expand Up @@ -72,7 +72,7 @@ fn roundtrip_set_get() {
many_types.c(&other_dict);

{
use crate::generated::ManyTypesGetters;
use crate::generated::{ManyTypesGetters, OtherDictGetters};
assert_eq!(many_types.a(), "a");
assert_eq!(many_types.n1(), 1);
assert_eq!(many_types.n2(), 2);
Expand All @@ -81,5 +81,13 @@ fn roundtrip_set_get() {
assert_eq!(many_types.n5(), 5);
assert_eq!(many_types.n6(), 6);
assert_eq!(many_types.c(), other_dict);
assert_eq!(many_types.c().a(), 42);
}

crate::generated::ManyTypesGetters::c(&many_types).a(1337);

{
use crate::generated::{ManyTypesGetters, OtherDictGetters};
assert_eq!(many_types.c().a(), 1337);
}
}

0 comments on commit 9440e4e

Please sign in to comment.