From 696895bca1ea5799719bf3652cb986e199b0b3dd Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 3 Jul 2014 17:12:01 +0100 Subject: [PATCH] ScopedValueSetter test --- source/tests/CarlaUtils.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/tests/CarlaUtils.cpp b/source/tests/CarlaUtils.cpp index cff5207e8..566e0a260 100644 --- a/source/tests/CarlaUtils.cpp +++ b/source/tests/CarlaUtils.cpp @@ -641,7 +641,23 @@ static void test_CarlaJuceUtils() delete e; delete f; delete new LeakTestClass; - //ScopedValueSetter s; + int x = 1; + + { + assert(x == 1); + ScopedValueSetter s(x, 2); + assert(x == 2); + } + + assert(x == 1); + + { + assert(x == 1); + ScopedValueSetter s(x, 3, 4); + assert(x == 3); + } + + assert(x == 4); } #if 0