From 5200cdbee69baf76bd7900c09dec46ccaecae3e8 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 3 May 2016 07:56:43 +0000 Subject: [PATCH] .autotest git-svn-id: svn://ultimatepp.org/upp/trunk@9775 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/CallbackPick/CallbackPick.cpp | 10 +++++----- autotest/RangeInsertTest/RangeInsertTest.cpp | 2 +- autotest/RangeInsertTest/RangeInsertTest.upp | 2 ++ autotest/ValueRef/ValueRef.cpp | 7 +++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/autotest/CallbackPick/CallbackPick.cpp b/autotest/CallbackPick/CallbackPick.cpp index 3d98de22e..b2f841792 100644 --- a/autotest/CallbackPick/CallbackPick.cpp +++ b/autotest/CallbackPick/CallbackPick.cpp @@ -39,7 +39,7 @@ struct Test : Pte { bool Bool5C(V p1, V p2, V p3, V p4, V p5) const { Check(p1); Check(p2); Check(p3); Check(p4); ; Check(p5); return false; } }; -void Function() {} +void Function0() {} void Function1(V p1) { Check(p1); } void Function2(V p1, V p2) { Check(p1); Check(p2); } void Function3(V p1, V p2, V p3) { Check(p1); Check(p2); Check(p3); } @@ -68,7 +68,7 @@ CONSOLE_APP_MAIN callback(&x, &Test::Method)(); pteback(&x, &Test::MethodC)(); callback(&x, &Test::MethodC)(); - callback(Function)(); + callback(Function0)(); pteback(&x, &Test::Method1)(clone(h)); callback(&x, &Test::Method1)(clone(h)); @@ -126,8 +126,8 @@ CONSOLE_APP_MAIN callback(&x, &Test::Bool4C)(clone(h), clone(h), clone(h), clone(h)); callback(BoolFn4)(clone(h), clone(h), clone(h), clone(h)); - // Arg1 callbacks - + // Arg1 callbacks - does not work anymore +/* pteback1(&x, &Test::Method1, clone(h))(); callback1(&x, &Test::Method1, clone(h))(); pteback1(&x, &Test::Method1C, clone(h))(); @@ -325,6 +325,6 @@ CONSOLE_APP_MAIN pteback5(&x, &Test::Bool5C, clone(h), clone(h), clone(h), clone(h), clone(h))(); callback5(&x, &Test::Bool5C, clone(h), clone(h), clone(h), clone(h), clone(h))(); callback5(BoolFn5, clone(h), clone(h), clone(h), clone(h), clone(h))(); - +*/ LOG("--------------- OK"); } diff --git a/autotest/RangeInsertTest/RangeInsertTest.cpp b/autotest/RangeInsertTest/RangeInsertTest.cpp index adb0f53df..d67712cfb 100644 --- a/autotest/RangeInsertTest/RangeInsertTest.cpp +++ b/autotest/RangeInsertTest/RangeInsertTest.cpp @@ -13,7 +13,7 @@ CONSOLE_APP_MAIN InVector iv; InArray av; - for(int i = 0; i < 100000; i++) { + for(int i = 0; i < 10000; i++) { if(v.GetCount() > 100000) { int pos = Random(v.GetCount() + 1); int count = Random(v.GetCount() - pos); diff --git a/autotest/RangeInsertTest/RangeInsertTest.upp b/autotest/RangeInsertTest/RangeInsertTest.upp index 21cb90aca..3ac288858 100644 --- a/autotest/RangeInsertTest/RangeInsertTest.upp +++ b/autotest/RangeInsertTest/RangeInsertTest.upp @@ -1,3 +1,5 @@ +description "#WAIT: 20\377"; + uses Core; diff --git a/autotest/ValueRef/ValueRef.cpp b/autotest/ValueRef/ValueRef.cpp index 716623575..af078f92d 100644 --- a/autotest/ValueRef/ValueRef.cpp +++ b/autotest/ValueRef/ValueRef.cpp @@ -8,8 +8,7 @@ bool OK; String val = AsString(x); \ bool ok = val == ref; \ LOG("CHECK(" << #x << ", " << AsCString(val) << ");"); \ -if(!ok) LOG("#FAILED"); \ -OK = OK && ok; } +ASSERT(ok); } CONSOLE_APP_MAIN { @@ -22,7 +21,7 @@ CONSOLE_APP_MAIN m("key2", "value2"); Value vm = m; - Value vm2 = m; + Value vm2 = m; vm.At(1) = "123"; CHECK(vm, "{ key1: value1, key2: 123 }"); @@ -53,7 +52,7 @@ CONSOLE_APP_MAIN CHECK(v2, "[1, 2]"); CHECK(v3, "[1]"); - { + { Value va; CHECK(va, ""); va << 1;