Browse Source

Cleanup ctkUtilsTests using QTestLib

Issue #348
Julien Finet 11 years ago
parent
commit
01a5f73eca

+ 3 - 6
Libs/Core/Testing/Cpp/CMakeLists.txt

@@ -41,11 +41,9 @@ set(KITTests_SRCS
   ctkLoggerTest1.cpp
   ctkModelTesterTest1.cpp
   ctkModelTesterTest2.cpp
-  ctkUtilsClosestPowerOfTenTest1.cpp
   ctkUtilsCopyDirRecursivelyTest1.cpp
-  ctkUtilsOrderOfMagnitudeTest1.cpp
   ctkUtilsQtHandleToStringTest1.cpp
-  ctkUtilsSignificantDecimalsTest1.cpp
+  ctkUtilsTest.cpp
   ctkUtilsTest1.cpp
   ctkUtilsTest2.cpp
   ctkUtilsTest3.cpp
@@ -105,6 +103,7 @@ set(Tests_Helpers_MOC_CPP)
 QT4_WRAP_CPP(Tests_Helpers_MOC_CPP ${Tests_Helpers_MOC_SRCS})
 QT4_GENERATE_MOCS(
   ctkBooleanMapperTest.cpp
+  ctkUtilsTest.cpp
   )
 
 if(HAVE_BFD)
@@ -165,11 +164,9 @@ SIMPLE_TEST( ctkSingletonTest1 )
 SIMPLE_TEST( ctkTransferFunctionTest1 )
 SIMPLE_TEST( ctkTransferFunctionRepresentationTest1 )
 SIMPLE_TEST( ctkTransferFunctionRepresentationTest2 )
-SIMPLE_TEST( ctkUtilsClosestPowerOfTenTest1 )
 SIMPLE_TEST( ctkUtilsCopyDirRecursivelyTest1 )
-SIMPLE_TEST( ctkUtilsOrderOfMagnitudeTest1 )
 SIMPLE_TEST( ctkUtilsQtHandleToStringTest1 )
-SIMPLE_TEST( ctkUtilsSignificantDecimalsTest1 )
+SIMPLE_TEST( ctkUtilsTest )
 SIMPLE_TEST( ctkUtilsTest1 )
 SIMPLE_TEST( ctkUtilsTest2 )
 SIMPLE_TEST( ctkUtilsTest3 )

+ 0 - 134
Libs/Core/Testing/Cpp/ctkUtilsClosestPowerOfTenTest1.cpp

@@ -1,134 +0,0 @@
-/*=========================================================================
-
-  Library:   CTK
-
-  Copyright (c) Kitware Inc.
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0.txt
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-=========================================================================*/
-
-// Qt includes
-#include <QDebug>
-#include <QStringList>
-
-// CTK includes
-#include "ctkUtils.h"
-
-// STD includes
-#include <stdlib.h>
-#include <iostream>
-#include <limits>
-#include <string>
-#include <vector>
-
-//-----------------------------------------------------------------------------
-int ctkUtilsClosestPowerOfTenTest1(int , char *  [] )
-{
-  std::cout.precision(16);
-
-  if (ctk::closestPowerOfTen(1.) != 1.)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 1. << ". Found " << ctk::closestPowerOfTen(1.)
-              << " instead of 1." << std::endl;
-    return EXIT_FAILURE;
-    }
-  if (ctk::closestPowerOfTen(2.) != 1.)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 2. << ". Found " << ctk::closestPowerOfTen(2.)
-              << " instead of 1." << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::closestPowerOfTen(10.) != 10.)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 10. << ". Found " << ctk::closestPowerOfTen(10.)
-              << " instead of 10." << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::closestPowerOfTen(45.) != 10.)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 45. << ". Found " << ctk::closestPowerOfTen(45.)
-              << " instead of 10." << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::closestPowerOfTen(98) != 100.)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 98. << ". Found " << ctk::closestPowerOfTen(98.)
-              << " instead of 100." << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::closestPowerOfTen(50.) != 10.)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 50. << ". Found " << ctk::closestPowerOfTen(50.)
-              << " instead of 10." << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::closestPowerOfTen(-1234.) != -1000)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << -1234 << ". Found " << ctk::closestPowerOfTen(-1234)
-              << " instead of -1000" << std::endl;
-    return EXIT_FAILURE;
-    }
-  double closest  = ctk::closestPowerOfTen(0.01);
-  if ( closest < 0.01 - std::numeric_limits<double>::epsilon() ||
-       closest > 0.01 + std::numeric_limits<double>::epsilon())
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 0.01 << ". Found " << closest
-              << " instead of 0.01" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  closest = ctk::closestPowerOfTen(0.00000000015);
-  if ( closest < 0.0000000001 - std::numeric_limits<double>::epsilon() ||
-       closest > 0.0000000001 + std::numeric_limits<double>::epsilon())
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 0.00000000015 << ". Found " << closest
-              << " instead of 0.0000000001" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  closest = ctk::closestPowerOfTen(0.1);
-  if (closest < 0.1 - std::numeric_limits<double>::epsilon() ||
-       closest > 0.1 + std::numeric_limits<double>::epsilon())
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 0.1 << ". Found " << closest
-              << " instead of 0.1" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  closest = ctk::closestPowerOfTen(0.);
-  if (closest != 0)
-    {
-    std::cerr << "closest power of 10 failed for number:"
-              << 0. << ". Found " << closest
-              << " instead of 0" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  return EXIT_SUCCESS;
-}

+ 0 - 155
Libs/Core/Testing/Cpp/ctkUtilsOrderOfMagnitudeTest1.cpp

@@ -1,155 +0,0 @@
-/*=========================================================================
-
-  Library:   CTK
-
-  Copyright (c) Kitware Inc.
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0.txt
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-=========================================================================*/
-
-// Qt includes
-#include <QDebug>
-#include <QStringList>
-
-// CTK includes
-#include "ctkUtils.h"
-
-// STD includes
-#include <iostream>
-#include <limits>
-#include <stdlib.h>
-#include <string>
-#include <vector>
-
-bool test(double value, int expected)
-{
-  int decimals = ctk::significantDecimals(value);
-  if (decimals != expected)
-    {
-    std::cerr << std::fixed << value << " decimals: " << decimals << " -> " << expected << std::endl;
-    return false;
-    }
-  return true;
-}
-
-//-----------------------------------------------------------------------------
-int ctkUtilsOrderOfMagnitudeTest1(int , char *  [] )
-{
-  std::cout.precision(16);
-
-  if (ctk::orderOfMagnitude(1.) != 0)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 1. << ". Found " << ctk::orderOfMagnitude(1.)
-              << " instead of 0" << std::endl;
-    return EXIT_FAILURE;
-    }
-  if (ctk::orderOfMagnitude(2.) != 0)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 2. << ". Found " << ctk::orderOfMagnitude(2.)
-              << " instead of 0" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(10.) != 1)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 10. << ". Found " << ctk::orderOfMagnitude(10.)
-              << " instead of 1" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(11.) != 1)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 11. << ". Found " << ctk::orderOfMagnitude(11.)
-              << " instead of 1" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(0.1) != -1)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 0.1 << ". Found " << ctk::orderOfMagnitude(0.1)
-              << " instead of -1" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(0.11) != -1)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 0.11 << ". Found " << ctk::orderOfMagnitude(0.11)
-              << " instead of -1" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(0.2) != -1)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 0.2 << ". Found " << ctk::orderOfMagnitude(0.2)
-              << " instead of -1" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(0.01) != -2)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 0.01 << ". Found " << ctk::orderOfMagnitude(0.01)
-              << " instead of -2" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(0.0000000001) != -10)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 0.0000000001 << ". Found " << ctk::orderOfMagnitude(0.0000000001)
-              << " instead of -10" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(10.0001) != 1)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 10.0001 << ". Found " << ctk::orderOfMagnitude(10.0001)
-              << " instead of 1" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(100000000000.0001) != 11)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 100000000000.0001 << ". Found " << ctk::orderOfMagnitude(100000000000.0001)
-              << " instead of 11" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(100000000001.0001) != 11)
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 100000000001.0001 << ". Found " << ctk::orderOfMagnitude(100000000001.0001)
-              << " instead of 11" << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  if (ctk::orderOfMagnitude(0) != std::numeric_limits<int>::min())
-    {
-    std::cerr << "order of magnitude failed for number:"
-              << 0 << ". Found " << ctk::orderOfMagnitude(0)
-              << " instead of " << std::numeric_limits<int>::min() << std::endl;
-    return EXIT_FAILURE;
-    }
-
-  return EXIT_SUCCESS;
-}

+ 0 - 152
Libs/Core/Testing/Cpp/ctkUtilsSignificantDecimalsTest1.cpp

@@ -1,152 +0,0 @@
-/*=========================================================================
-
-  Library:   CTK
-
-  Copyright (c) Kitware Inc.
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0.txt
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-=========================================================================*/
-
-// Qt includes
-#include <QDebug>
-#include <QStringList>
-
-// CTK includes
-#include "ctkUtils.h"
-
-// STD includes
-#include <stdlib.h>
-#include <iostream>
-#include <string>
-#include <vector>
-
-bool testSignificantDecimals(double value, int expected)
-{
-  int decimals = ctk::significantDecimals(value);
-  if (decimals != expected)
-    {
-    std::cerr << std::fixed << value << " decimals: " << decimals << " -> " << expected << std::endl;
-    return true;
-    }
-  return false;
-}
-
-//-----------------------------------------------------------------------------
-int ctkUtilsSignificantDecimalsTest1(int , char *  [] )
-{
-  std::cout.precision(16);
-  if (testSignificantDecimals(123456., 0))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.1, 1))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.12, 2))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.123, 3))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.122, 3))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.1223, 4))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.1234, 4))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.0123, 4))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.0012, 4))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.001234, 6))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.000123, 6))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.0000, 0))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.0001, 4))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.3333333, 2))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.1333333, 3))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.3333334, 2))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.00122, 5))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.00123, 5))
-    {
-    return EXIT_FAILURE;
-    }
-  // internally representated as 123456.001109999997425
-  if (testSignificantDecimals(123456.00111, 5))
-    {
-    return EXIT_FAILURE;
-    }
-  // internally representated as 123456.270000000004075
-  if (testSignificantDecimals(123456.26999999999999996, 2))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(123456.863899999999987, 4))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(0.5, 1))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(0.25, 2))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(0.125, 3))
-    {
-    return EXIT_FAILURE;
-    }
-  if (testSignificantDecimals(0.1234567891013151, 16))
-    {
-    return EXIT_FAILURE;
-    }
-  return EXIT_SUCCESS;
-}

+ 172 - 0
Libs/Core/Testing/Cpp/ctkUtilsTest.cpp

@@ -0,0 +1,172 @@
+/*=========================================================================
+
+  Library:   CTK
+
+  Copyright (c) Kitware Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0.txt
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=========================================================================*/
+
+// CTK includes
+#include "ctkUtils.h"
+#include "ctkTest.h"
+
+// STD includes
+#include <iostream>
+#include <limits>
+
+// ----------------------------------------------------------------------------
+class ctkUtilsTester: public QObject
+{
+  Q_OBJECT
+private slots:
+  void initTestCase();
+
+  void testOrderOfMagnitude();
+  void testOrderOfMagnitude_data();
+
+  void testClosestPowerOfTen();
+  void testClosestPowerOfTen_data();
+
+  void testSignificantDecimals();
+  void testSignificantDecimals_data();
+};
+
+// ----------------------------------------------------------------------------
+void ctkUtilsTester::initTestCase()
+{
+  std::cout.precision(16);
+  std::cerr.precision(16);
+  std::cout << std::fixed;
+  std::cerr << std::fixed;
+}
+
+// ----------------------------------------------------------------------------
+void ctkUtilsTester::testOrderOfMagnitude()
+{
+  QFETCH(double, value);
+  QFETCH(int, expectedOrder);
+  QCOMPARE(ctk::orderOfMagnitude(value), expectedOrder);
+}
+
+// ----------------------------------------------------------------------------
+void ctkUtilsTester::testOrderOfMagnitude_data()
+{
+  QTest::addColumn<double>("value");
+  QTest::addColumn<int>("expectedOrder");
+
+  QTest::newRow("1. -> 0") << 1. << 0;
+  QTest::newRow("2. -> 0") << 2. << 0;
+  QTest::newRow("10. -> 1") << 10. << 1;
+  QTest::newRow("11. -> 1") << 11. << 1;
+  QTest::newRow("0.1 -> -1") << 0.1 << -1;
+  QTest::newRow("0.11 -> -1") << 0.1 << -1;
+  QTest::newRow("0.2 -> -1") << 0.2 << -1;
+  QTest::newRow("0.01 -> -2") << 0.01 << -2;
+  QTest::newRow("0.0000000001 -> -10") << 0.0000000001 << -10;
+  QTest::newRow("10.0001 -> 1") << 10.0001 << 1;
+  QTest::newRow("100000000001.0001 -> 11") << 100000000001.0001 << 11;
+  QTest::newRow("0. -> min") << 0. << std::numeric_limits<int>::min();
+}
+
+// ----------------------------------------------------------------------------
+void ctkUtilsTester::testClosestPowerOfTen()
+{
+  QFETCH(double, value);
+  QFETCH(double, expectedValue);
+  QFETCH(bool, compareWithEpsilon);
+  const double closestValue = ctk::closestPowerOfTen(value);
+  if (compareWithEpsilon)
+    {
+    const double epsilon = std::numeric_limits<double>::epsilon();
+    QVERIFY( closestValue > expectedValue - epsilon );
+    QVERIFY( closestValue < expectedValue + epsilon );
+    }
+  else
+    {
+    QCOMPARE(closestValue, expectedValue);
+    }
+}
+
+// ----------------------------------------------------------------------------
+void ctkUtilsTester::testClosestPowerOfTen_data()
+{
+  QTest::addColumn<double>("value");
+  QTest::addColumn<double>("expectedValue");
+  QTest::addColumn<bool>("compareWithEpsilon");
+
+  QTest::newRow("1. -> 1.") << 1. << 1. << false;
+  QTest::newRow("2. -> 1.") << 2. << 1. << false;
+  QTest::newRow("10. -> 10.") << 10. << 10. << false;
+  QTest::newRow("45. -> 10.") << 45. << 10. << false;
+  QTest::newRow("98. -> 100.") << 98. << 100. << false;
+  QTest::newRow("50. -> 10.") << 50. << 10. << false;
+  QTest::newRow("-1234. -> -1000.") << -1234. << -1000. << false;
+  QTest::newRow("0.01 -> 0.01") << 0.01 << 0.01 << true;
+  QTest::newRow("0.00000000015 -> 0.0000000001")
+    << 0.00000000015 << 0.0000000001 << true;
+  QTest::newRow("0.1 -> 0.1") << 0.1 << 0.1 << true;
+  QTest::newRow("0. -> 0.") << 0. << 0. << false;
+}
+
+// ----------------------------------------------------------------------------
+void ctkUtilsTester::testSignificantDecimals()
+{
+  QFETCH(double, value);
+  QFETCH(int, expectedDecimals);
+
+  QCOMPARE(ctk::significantDecimals(value), expectedDecimals);
+}
+
+// ----------------------------------------------------------------------------
+void ctkUtilsTester::testSignificantDecimals_data()
+{
+  QTest::addColumn<double>("value");
+  QTest::addColumn<int>("expectedDecimals");
+
+  QTest::newRow("123456 -> 0") << 123456. << 0;
+  QTest::newRow("123456.1 -> 1") << 123456.1 << 1;
+  QTest::newRow("123456.12 -> 2") << 123456.12 << 2;
+  QTest::newRow("123456.123 -> 3") << 123456.123 << 3;
+  QTest::newRow("123456.122 -> 3") << 123456.122 << 3;
+  QTest::newRow("123456.1223 -> 4") << 123456.1223 << 4;
+  QTest::newRow("123456.1234 -> 4") << 123456.1234 << 4;
+  QTest::newRow("123456.0123 -> 4") << 123456.0123 << 4;
+  QTest::newRow("123456.0012 -> 4") << 123456.0012 << 4;
+  QTest::newRow("123456.001234 -> 6") << 123456.001234 << 6;
+  QTest::newRow("123456.000123 -> 6") << 123456.000123 << 6;
+  QTest::newRow("123456.0000 -> 0") << 123456.0000 << 0;
+  QTest::newRow("123456.0001 -> 4") << 123456.0001 << 4;
+  QTest::newRow("123456.3333333 -> 2") << 123456.3333333 << 2;
+  QTest::newRow("123456.1333333 -> 3") << 123456.1333333 << 3;
+  QTest::newRow("123456.3333334 -> 2") << 123456.3333334 << 2;
+  QTest::newRow("123456.00122 -> 5") << 123456.00122 << 5;
+  QTest::newRow("123456.00123 -> 5") << 123456.00123 << 5;
+  // internally representated as 123456.001109999997425
+  QTest::newRow("123456.00111 -> 5") << 123456.00111 << 5;
+  // internally representated as 123456.270000000004075
+  QTest::newRow("123456.26999999999999996 -> 2")
+    << 123456.26999999999999996 << 2;
+  QTest::newRow("123456.863899999999987 -> 4") << 123456.863899999999987 << 4;
+  QTest::newRow("0.5 -> 1") << 0.5 << 1;
+  QTest::newRow("0.25 -> 2") << 0.25 << 2;
+  QTest::newRow("0.125 -> 3") << 0.125 << 3;
+  QTest::newRow("0.1234567891013151 -> 16") << 0.1234567891013151 << 16;
+}
+
+// ----------------------------------------------------------------------------
+CTK_TEST_MAIN(ctkUtilsTest)
+#include "moc_ctkUtilsTest.cpp"
+
+