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



commit c6fed0004c03d6df903b04cf9fb6c970c2b343fb
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 0d07c1087..89ac09622 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -283,6 +283,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]