mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
tests: add tests for action widget syntax
This commit is contained in:
parent
736681a841
commit
d9ef1d4df9
17 changed files with 120 additions and 0 deletions
8
tests/sample_errors/action_widget_float_response.blp
Normal file
8
tests/sample_errors/action_widget_float_response.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Dialog {
|
||||
[action response=17.9]
|
||||
Button float_response_button {
|
||||
|
||||
}
|
||||
}
|
1
tests/sample_errors/action_widget_float_response.err
Normal file
1
tests/sample_errors/action_widget_float_response.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,22,4,Response type must be GtkResponseType member or integer, not float
|
8
tests/sample_errors/action_widget_have_no_id.blp
Normal file
8
tests/sample_errors/action_widget_have_no_id.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Dialog {
|
||||
[action response=cancel]
|
||||
Button {
|
||||
label: _("Cancel");
|
||||
}
|
||||
}
|
1
tests/sample_errors/action_widget_have_no_id.err
Normal file
1
tests/sample_errors/action_widget_have_no_id.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,13,15,Action widget must have ID
|
13
tests/sample_errors/action_widget_multiple_default.blp
Normal file
13
tests/sample_errors/action_widget_multiple_default.blp
Normal file
|
@ -0,0 +1,13 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Dialog {
|
||||
[action response=yes default]
|
||||
Button yes_button {
|
||||
|
||||
}
|
||||
|
||||
[action response=no default]
|
||||
Button no_button {
|
||||
|
||||
}
|
||||
}
|
1
tests/sample_errors/action_widget_multiple_default.err
Normal file
1
tests/sample_errors/action_widget_multiple_default.err
Normal file
|
@ -0,0 +1 @@
|
|||
9,25,7,Default response is already set
|
8
tests/sample_errors/action_widget_negative_response.blp
Normal file
8
tests/sample_errors/action_widget_negative_response.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Dialog {
|
||||
[action response = -179]
|
||||
Button numeric_response_button {
|
||||
|
||||
}
|
||||
}
|
1
tests/sample_errors/action_widget_negative_response.err
Normal file
1
tests/sample_errors/action_widget_negative_response.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,24,4,Numeric response type can't be negative
|
8
tests/sample_errors/action_widget_not_action.blp
Normal file
8
tests/sample_errors/action_widget_not_action.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Dialog {
|
||||
[some_type response=ok]
|
||||
Button ok_button {
|
||||
|
||||
}
|
||||
}
|
1
tests/sample_errors/action_widget_not_action.err
Normal file
1
tests/sample_errors/action_widget_not_action.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,16,11,Only action widget can have response ID
|
8
tests/sample_errors/action_widget_not_in_dialog.blp
Normal file
8
tests/sample_errors/action_widget_not_in_dialog.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Box {
|
||||
[action response=ok]
|
||||
Button ok_button {
|
||||
|
||||
}
|
||||
}
|
1
tests/sample_errors/action_widget_not_in_dialog.err
Normal file
1
tests/sample_errors/action_widget_not_in_dialog.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,13,11,Gtk.Box is not a Gtk.Dialog, so it doesn't have action widgets
|
8
tests/sample_errors/action_widget_response_dne.blp
Normal file
8
tests/sample_errors/action_widget_response_dne.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Dialog {
|
||||
[action response=hello-world]
|
||||
Button hello_world_button {
|
||||
|
||||
}
|
||||
}
|
1
tests/sample_errors/action_widget_response_dne.err
Normal file
1
tests/sample_errors/action_widget_response_dne.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,22,11,Response type "hello-world" doesn't exist
|
Loading…
Add table
Add a link
Reference in a new issue