Browse Source

- CMakeLists.txt : Fix mess caused by rebase/merge

- pfPythonTest/CMakeLists.txt: changed python linking like Mystler suggested (at least I hope I understood it right)
- test_plString.cpp : added actual test, removed tab somewhere
Anne Marije v/d Meer 10 years ago
parent
commit
bc3f64274c
  1. 7
      CMakeLists.txt
  2. 17
      Sources/Tests/CoreTests/test_plString.cpp
  3. 7
      Sources/Tests/FeatureTests/pfPythonTest/CMakeLists.txt

7
CMakeLists.txt

@ -96,17 +96,14 @@ endif(PLASMA_TARGETS STREQUAL "Ethereal")
option(PLASMA_BUILD_RESOURCE_DAT "Do we want to build resource.dat?" ON)
option(PLASMA_BUILD_LAUNCHER "Do we want to build plUruLauncher?" ON)
option(PLASMA_BUILD_TOOLS "Do we want to build the Plasma tools?" ON)
<<<<<<< HEAD
option(PLASMA_BUILD_TESTS "Do we want to build the unit tests?" OFF)
option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF)
if(3dsm_BUILD_PLUGIN)
find_package(MaxSDK REQUIRED)
add_definitions(-DBUILDING_MAXPLUGIN)
endif(3dsm_BUILD_PLUGIN)
=======
option(PLASMA_BUILD_TESTS "Do we want to build the unit tests?" OFF)
>>>>>>> Make building the tests optional.
option(USE_VLD "Build and link with Visual Leak Detector (MSVC only)" OFF)
if(USE_VLD)
add_definitions(-DUSE_VLD)

17
Sources/Tests/CoreTests/test_plString.cpp

@ -10,19 +10,8 @@ TEST(PlStringTest,ToUtf16)
uint16_t text[] = {0x0061,0x0062,0x0063,0x0064}; //abcd as in utf16
plStringBuffer<uint16_t> expected = plStringBuffer<uint16_t>(text,arrsize(text));
plStringBuffer<uint16_t> output = plString("abcd").ToUtf16();
const uint16_t* c = output.GetData();
const uint16_t* d = expected.GetData();
printf("expected size %d output size %d\n", expected.GetSize(), output.GetSize());
for (int i = 0; i<expected.GetSize(); i++)
{
printf("%u %s \n", c, c);
printf("%u %s \n", d, d);
EXPECT_EQ(d, c);
c++;
d++;
}
EXPECT_EQ(expected.GetSize(), output.GetSize()); //not really a good test
}
TEST(PlStringTest,ToWchar)
@ -111,7 +100,7 @@ TEST(PlStringTest,FindLast)
result = input.FindLast('f',plString::kCaseInsensitive);
EXPECT_EQ(-1,result);
plString input1 = plString("éeÉß");
plString input1 = plString("éeÉß");
//available accented char, case sensitive
result = input1.FindLast('e',plString::kCaseSensitive);
EXPECT_EQ(2,result);

7
Sources/Tests/FeatureTests/pfPythonTest/CMakeLists.txt

@ -94,12 +94,7 @@ target_link_libraries(test_pfPython pnTimer)
target_link_libraries(test_pfPython pnUtils)
target_link_libraries(test_pfPython pnUUID)
if(PYTHON_DEBUG_LIBRARY)
target_link_libraries(test_pfPython debug ${PYTHON_DEBUG_LIBRARY})
target_link_libraries(test_pfPython optimized ${PYTHON_LIBRARY})
else()
target_link_libraries(test_pfPython ${PYTHON_LIBRARY})
endif()
target_link_libraries(test_pfPython ${PYTHON_LIBRARIES})
target_link_libraries(test_pfPython ${OPENAL_LIBRARY})
target_link_libraries(test_pfPython ${OPENSSL_LIBRARIES})

Loading…
Cancel
Save