From 4b543fc8426e86d0ff4f90a1e6687f665af40206 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sun, 16 Sep 2018 19:27:17 +0200 Subject: [PATCH] test: Add property lock test --- tests/objects/properties.vala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/objects/properties.vala b/tests/objects/properties.vala index 3d86de106..8008c1acb 100644 --- a/tests/objects/properties.vala +++ b/tests/objects/properties.vala @@ -28,6 +28,9 @@ public class Sample : Object { get { return _read_only; } } + public int public_prop { get; set; } + private int private_prop { get; set; } + public Sample (string name) { this.name = name; } @@ -56,7 +59,14 @@ public class Sample : Object { stdout.printf("automatic: %s\n", automatic); this.deleg = null; - } + + lock (public_prop) { + public_prop = 42; + } + lock (private_prop) { + private_prop = 42; + } + } public static int main () { var test = new Sample("InitialName"); -- 2.47.2