diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-05-19 16:22:10 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-05-19 19:14:52 +0900 |
commit | 71fb4a139179e9d27070f7f3e98971e3e029697f (patch) | |
tree | 92fbf03f1e546b3c99e6e06e98100b6ef8e4e2c6 /debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala | |
parent | 6eae1a16a1001287ef5129db86f4ef2145ace3ca (diff) | |
download | extra-dependencies-71fb4a139179e9d27070f7f3e98971e3e029697f.tar.gz extra-dependencies-71fb4a139179e9d27070f7f3e98971e3e029697f.zip |
uncrustify: updated to version 0.73
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala')
8 files changed, 155 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/Issue_2090.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/Issue_2090.vala new file mode 100644 index 00000000..22698792 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/Issue_2090.vala @@ -0,0 +1 @@ +int? some_int = null; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/Issue_2270.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/Issue_2270.vala new file mode 100644 index 00000000..7bb897d8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/Issue_2270.vala @@ -0,0 +1 @@ +new Gtk.Label (_("Label text")); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/advanced.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/advanced.vala new file mode 100644 index 00000000..2b85c031 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/advanced.vala @@ -0,0 +1,26 @@ +/* Advanced Vala Sample Code */ +using GLib; +public class Sample : Object { + public string name { get; set; } + public signal void foo (); + public Sample (construct string! name) { + } +public void run () { + foo += s => { + stdout.printf ("Lambda expression %s!\n", name); + }; + + /* Calling lambda expression */ + foo (); + } + static int main (string[] args) { + foreach (string arg in args) { + var sample = new Sample (arg); + sample.run (); + /* Object will automatically be freed + * at the end of the block */ + } + return 0; + } +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/gh287.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/gh287.vala new file mode 100644 index 00000000..fcb6fca6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/gh287.vala @@ -0,0 +1,32 @@ +int main () { + key_press_event.connect ((e) => { + switch (e.keyval) { + case Gdk.Key.@0: + if ((e.state & Gdk.ModifierType.CONTROL_MASK) != 0) { + action_zoom_default_font (); + return true; + } + + break; + case Gdk.Key.@1: //alt+[1-8] + case Gdk.Key.@7: + case Gdk.Key.@8: + if (((e.state & Gdk.ModifierType.MOD1_MASK) != 0) && settings.alt_changes_tab) { + var i = e.keyval - 49; + if (i > notebook.n_tabs - 1) + return false; + + notebook.current = notebook.get_tab_by_index ((int) i); + return true; + } + + break; + default: + assert_not_reached () ; + } + + return false; + }); + + return 0 ; + } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/list.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/list.vala new file mode 100644 index 00000000..e9b48acc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/list.vala @@ -0,0 +1,20 @@ + + +using GLib; + +public class GListTest : Object +{ + public GListTest { } + + static int main (string[] args) { + List<string> list; + list.append("TestString1"); + list.append("myTest"); + message ("list.length()=%d", list.length()); + + for ( int i = 0; i < list.length(); i++) { + string list2 = list.nth_data(i); + message ("%s", list2); + } + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/preproc.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/preproc.vala new file mode 100644 index 00000000..3ab2ccc8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/preproc.vala @@ -0,0 +1,10 @@ +int main () { +#if WANT_TO_COMPILE_THIS +gtkwidget.clicked.connect( (widdget) => { message ("Clicked" ) ; }) ; +#else +gtkwidget.enabled.connect( (widdget) => { +message ("Clicked" ) ; +}) ; +#endif +return 0 ; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/verbatim_str.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/verbatim_str.vala new file mode 100644 index 00000000..11f19c01 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/verbatim_str.vala @@ -0,0 +1,31 @@ +/* Advanced Vala Sample Code */ +using GLib; +public class Sample : Object { + public string name { get; set; } + public signal void foo (); + public Sample (construct string! name) { + } +public void run () { + foo += s => { + stdout.printf ("Lambda expression %s!\n", name); + }; + + /* Calling lambda expression */ + foo (); + } + static int main (string[] args) { + string sql = """ SELECT name "my_name" + FROM table + WHERE id='4' + """ ; + var where = """ WHERE name LIKE '%blah% + """ ; + foreach (string arg in args) { + var sample = new Sample (arg); + sample.run (); + /* Object will automatically be freed + * at the end of the block */ + } + return 0; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/verbatim_str2.vala b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/verbatim_str2.vala new file mode 100644 index 00000000..9d8798b7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/vala/verbatim_str2.vala @@ -0,0 +1,34 @@ +/* Advanced Vala Sample Code */ +using GLib; +public class Sample : Object { + public string name { get; set; } + public signal void foo (); + public Sample (construct string! name) { + } +public void run () { + foo += s => { + stdout.printf ("Lambda expression %s!\n", name); + }; + + /* Calling lambda expression */ + foo (); + } + static int main (string[] args) { + string sql = """SELECT name "my_name" + FROM table + WHERE id='4' +""" ; + var where = """ WHERE name LIKE '%blah% + """ ; + foreach (string arg in args) { + var sample = new Sample (arg); + sample.run (); + /* Object will automatically be freed + * at the end of the block + * a tab b + * c tab d + */ + } + return 0; + } +} |