From: Rico Tzschichholz Date: Sat, 17 Nov 2018 15:10:04 +0000 (+0100) Subject: tests: Add bug specific "lock test" X-Git-Tag: 0.43.1~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3bf5500950f194a0cefcc29f1f1289cc21eb210;p=thirdparty%2Fvala.git tests: Add bug specific "lock test" https://bugzilla.gnome.org/show_bug.cgi?id=629593 --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 2044a7a0a..cf7562570 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -292,6 +292,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 () { +}