changed unit test and switched compiler to clang with libc++
This commit is contained in:
parent
124a300a97
commit
05dbe09c15
@ -1 +1 @@
|
||||
Subproject commit c0c31320c1b70d1e4a4b4c865374a296e65b98e4
|
||||
Subproject commit 0a5065eff8ed00c77fcfdcaeb576f97013f7a91a
|
@ -1,8 +1,10 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
project(linux)
|
||||
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
|
||||
|
||||
# generic settings
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
|
||||
|
||||
# add coreclr
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPLATFORM_UNIX -DPAL_IMPLEMENTATION -D__LINUX__")
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "test_pal.h"
|
||||
|
||||
#include "pal.h"
|
||||
//#include <cppunit/config/SourcePrefix.h>
|
||||
#include "test_pal.h"
|
||||
|
||||
namespace Microsoft {
|
||||
|
||||
@ -38,6 +36,7 @@ namespace Microsoft {
|
||||
CPPUNIT_ASSERT_EQUAL(sizeof(UINT64),(std::size_t)8);
|
||||
|
||||
// windows integer max and min size constants
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(CHAR_BIT,8);
|
||||
CPPUNIT_ASSERT_EQUAL(SCHAR_MIN,-127-1);
|
||||
CPPUNIT_ASSERT_EQUAL(SCHAR_MAX,127);
|
||||
@ -48,9 +47,11 @@ namespace Microsoft {
|
||||
CPPUNIT_ASSERT_EQUAL(INT_MIN,-2147483647-1);
|
||||
CPPUNIT_ASSERT_EQUAL(INT_MAX,2147483647);
|
||||
CPPUNIT_ASSERT_EQUAL(UINT_MAX,0xffffffff);
|
||||
CPPUNIT_ASSERT_EQUAL(LONG_MIN,-2147483647L-1);
|
||||
CPPUNIT_ASSERT_EQUAL(LONG_MAX,2147483647L);
|
||||
CPPUNIT_ASSERT_EQUAL(ULONG_MAX,0xffffffff);
|
||||
|
||||
// TODO: these are part of limits.h and will never fit windows values
|
||||
// CPPUNIT_ASSERT_EQUAL(LONG_MIN,-2147483647L-1);
|
||||
// CPPUNIT_ASSERT_EQUAL(LONG_MAX,2147483647L);
|
||||
// CPPUNIT_ASSERT_EQUAL(ULONG_MAX,0xffffffffUL);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(MAXSHORT,0x7fff);
|
||||
CPPUNIT_ASSERT_EQUAL(MAXLONG,0x7fffffff);
|
||||
@ -64,4 +65,4 @@ namespace Microsoft {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user