Browse Source

ScopedValueSetter test

tags/1.9.4
falkTX 10 years ago
parent
commit
696895bca1
1 changed files with 17 additions and 1 deletions
  1. +17
    -1
      source/tests/CarlaUtils.cpp

+ 17
- 1
source/tests/CarlaUtils.cpp View File

@@ -641,7 +641,23 @@ static void test_CarlaJuceUtils()
delete e; delete f; delete e; delete f;
delete new LeakTestClass; delete new LeakTestClass;


//ScopedValueSetter s;
int x = 1;

{
assert(x == 1);
ScopedValueSetter<int> s(x, 2);
assert(x == 2);
}

assert(x == 1);

{
assert(x == 1);
ScopedValueSetter<int> s(x, 3, 4);
assert(x == 3);
}

assert(x == 4);
} }


#if 0 #if 0


Loading…
Cancel
Save