mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add tests, remove unused code, fix bugs
- Added tests for more error messages - Test the "go to reference" feature at every character index of every test case - Delete unused code and imports - Fix some bugs I found along the way
This commit is contained in:
parent
5b0f662478
commit
9b9fab832b
47 changed files with 140 additions and 190 deletions
5
tests/sample_errors/float_to_int_assignment.blp
Normal file
5
tests/sample_errors/float_to_int_assignment.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Entry {
|
||||
margin-bottom: 10.5;
|
||||
}
|
1
tests/sample_errors/float_to_int_assignment.err
Normal file
1
tests/sample_errors/float_to_int_assignment.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,18,4,Cannot convert 10.5 to integer
|
3
tests/sample_errors/int_object.blp
Normal file
3
tests/sample_errors/int_object.blp
Normal file
|
@ -0,0 +1,3 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
int {}
|
1
tests/sample_errors/int_object.err
Normal file
1
tests/sample_errors/int_object.err
Normal file
|
@ -0,0 +1 @@
|
|||
3,1,3,int is not a class
|
7
tests/sample_errors/menu_assignment.blp
Normal file
7
tests/sample_errors/menu_assignment.blp
Normal file
|
@ -0,0 +1,7 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Overlay {
|
||||
child: my_menu;
|
||||
}
|
||||
|
||||
menu my_menu {}
|
1
tests/sample_errors/menu_assignment.err
Normal file
1
tests/sample_errors/menu_assignment.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,10,7,Cannot assign Gio.Menu to Gtk.Widget
|
5
tests/sample_errors/string_to_num_assignment.blp
Normal file
5
tests/sample_errors/string_to_num_assignment.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Entry {
|
||||
margin-bottom: "10";
|
||||
}
|
1
tests/sample_errors/string_to_num_assignment.err
Normal file
1
tests/sample_errors/string_to_num_assignment.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,18,4,Cannot convert string to number
|
5
tests/sample_errors/string_to_object_assignment.blp
Normal file
5
tests/sample_errors/string_to_object_assignment.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Button {
|
||||
child: "Click me";
|
||||
}
|
1
tests/sample_errors/string_to_object_assignment.err
Normal file
1
tests/sample_errors/string_to_object_assignment.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,10,10,Cannot convert string to Gtk.Widget
|
6
tests/sample_errors/string_to_type_assignment.blp
Normal file
6
tests/sample_errors/string_to_type_assignment.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
using Gio 2.0;
|
||||
|
||||
Gio.ListStore {
|
||||
item-type: "Button";
|
||||
}
|
1
tests/sample_errors/string_to_type_assignment.err
Normal file
1
tests/sample_errors/string_to_type_assignment.err
Normal file
|
@ -0,0 +1 @@
|
|||
5,14,8,Cannot convert string to GType
|
5
tests/sample_errors/translated_assignment.blp
Normal file
5
tests/sample_errors/translated_assignment.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Button {
|
||||
child: _("Click me");
|
||||
}
|
1
tests/sample_errors/translated_assignment.err
Normal file
1
tests/sample_errors/translated_assignment.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,10,13,Cannot convert translated string to Gtk.Widget
|
5
tests/sample_errors/typeof_assignment.blp
Normal file
5
tests/sample_errors/typeof_assignment.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Button {
|
||||
label: typeof<Button>;
|
||||
}
|
1
tests/sample_errors/typeof_assignment.err
Normal file
1
tests/sample_errors/typeof_assignment.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,10,14,Cannot convert GType to string
|
1
tests/sample_errors/unrecognized_syntax.blp
Normal file
1
tests/sample_errors/unrecognized_syntax.blp
Normal file
|
@ -0,0 +1 @@
|
|||
~
|
1
tests/sample_errors/unrecognized_syntax.err
Normal file
1
tests/sample_errors/unrecognized_syntax.err
Normal file
|
@ -0,0 +1 @@
|
|||
1,1,0,Could not determine what kind of syntax is meant here
|
5
tests/sample_errors/upgrade_sync_create.blp
Normal file
5
tests/sample_errors/upgrade_sync_create.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Button btn {
|
||||
label: bind btn.label sync-create;
|
||||
}
|
1
tests/sample_errors/upgrade_sync_create.err
Normal file
1
tests/sample_errors/upgrade_sync_create.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,25,11,'sync-create' is now the default. Use 'no-sync-create' if this is not wanted.
|
5
tests/sample_errors/upgrade_template_list_item.blp
Normal file
5
tests/sample_errors/upgrade_template_list_item.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
BuilderListItemFactory {
|
||||
template {}
|
||||
}
|
1
tests/sample_errors/upgrade_template_list_item.err
Normal file
1
tests/sample_errors/upgrade_template_list_item.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,3,8,Expected type name after 'template' keyword
|
Loading…
Add table
Add a link
Reference in a new issue