[vala/0.36] tests: Add bug specific "lock test"
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] tests: Add bug specific "lock test"
- Date: Thu, 6 Dec 2018 15:03:05 +0000 (UTC)
commit 6d8d60a2d8284251a2d05a2f4397be3f451b33e0
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 0c3733cc7..778c18971 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -251,6 +251,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]