[vala/0.42] tests: Add bug specific "lock test"



commit 49ae76e5db30cbcb0c7b3019507d8dc4e756842c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Nov 17 16:10:04 2018 +0100

    tests: Add bug specific "lock test"
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629593

 tests/Makefile.am            |  1 +
 tests/objects/bug629593.vala | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4e761d793..4fbb9b213 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -290,6 +290,7 @@ TESTS = \
        objects/bug624594.vala \
        objects/bug626038.vala \
        objects/bug628639.vala \
+       objects/bug629593.vala \
        objects/bug631267.vala \
        objects/bug634782.vala \
        objects/bug641418-1.test \
diff --git a/tests/objects/bug629593.vala b/tests/objects/bug629593.vala
new file mode 100644
index 000000000..476dc4d32
--- /dev/null
+++ b/tests/objects/bug629593.vala
@@ -0,0 +1,32 @@
+public class Foo {
+       protected int thing_to_lock_on;
+       public int other_variable;
+
+       public Foo () {
+               other_variable = 0;
+       }
+
+       public void run () {
+               lock (thing_to_lock_on) {
+                       other_variable = 1;
+               }
+       }
+}
+
+public class Bar {
+       protected class int thing_to_lock_on;
+       public int other_variable;
+
+       public Bar () {
+               other_variable = 0;
+       }
+
+       public void run () {
+               lock (thing_to_lock_on) {
+                       other_variable = 1;
+               }
+       }
+}
+
+void main () {
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]