]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add bug specific "lock test"
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 17 Nov 2018 15:10:04 +0000 (16:10 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 26 Nov 2018 08:59:49 +0000 (09:59 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=629593

tests/Makefile.am
tests/objects/bug629593.vala [new file with mode: 0644]

index 4e761d793fe746783516c770a662a982a96d480c..4fbb9b2137a228acf5a140a71af337dabab10fc1 100644 (file)
@@ -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 (file)
index 0000000..476dc4d
--- /dev/null
@@ -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 () {
+}