mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-06 16:19:07 -04:00
move variants into testing
This commit is contained in:
parent
96c5760eaf
commit
c708532a8d
3 changed files with 86 additions and 16 deletions
42
tests/samples/variants.blp
Normal file
42
tests/samples/variants.blp
Normal file
|
@ -0,0 +1,42 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
$BlueprintTestObject {
|
||||
// test-one: variant<"s">("one");
|
||||
test-zero: variant<"b">(true);
|
||||
test-one: variant<"s">("one");
|
||||
test-two: variant<"i">(2);
|
||||
test-three: variant<"(ii)">((3, 4));
|
||||
test-four: variant<"ai">([5, 6]);
|
||||
test-five: variant<"{sv}">({"key", <"value">});
|
||||
test-six: variant<"a{ss}">({
|
||||
"GLib": "2.24",
|
||||
"Gtk": "4.16"
|
||||
});
|
||||
test-seven: variant<"ams">([just "2", nothing]);
|
||||
}
|
||||
|
||||
menu test_menu {
|
||||
submenu {
|
||||
label: "Test menu";
|
||||
item {
|
||||
label: "Option 1";
|
||||
action: "app.test_menu.set_action";
|
||||
target: variant<"y">(1);
|
||||
}
|
||||
item {
|
||||
label: "Option 2";
|
||||
action: "app.test_menu.set_action";
|
||||
target: variant<"y">(2);
|
||||
}
|
||||
item {
|
||||
label: "Option 3";
|
||||
action: "app.test_menu.set_action";
|
||||
target: variant<"y">(3);
|
||||
}
|
||||
item {
|
||||
label: "Option 4";
|
||||
action: "app.test_menu.set_action";
|
||||
target: variant<"y">(4);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue