Changeset 217182 in webkit
- Timestamp:
- May 19, 2017 8:31:28 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/tests/DateTests.mm
r179450 r217182 68 68 NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 69 69 [formatter setDateFormat:@"MMMM dd',' yyyy hh:mm:ss"]; 70 [formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]]; 70 71 NSDate *februaryFourth2014 = [formatter dateFromString:@"February 4, 2014 11:40:03"]; 71 72 NSDateComponents *components = [[NSCalendar currentCalendar] components:unitFlags fromDate:februaryFourth2014]; … … 94 95 NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 95 96 [formatter setDateFormat:@"MMMM dd',' yyyy hh:mm:ss"]; 97 [formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]]; 96 98 NSDate *februaryFourth2014 = [formatter dateFromString:@"February 4, 2014 11:40:03"]; 97 99 NSDateComponents *components = [[NSCalendar currentCalendar] components:unitFlags fromDate:februaryFourth2014]; -
trunk/Source/JavaScriptCore/ChangeLog
r217179 r217182 1 2017-05-19 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 [JSC] Enable testapi on Mac CMake build 4 https://bugs.webkit.org/show_bug.cgi?id=172354 5 6 Reviewed by Alex Christensen. 7 8 This patch makes testapi buildable and runnable for Mac CMake port. 9 10 * API/tests/DateTests.mm: 11 (+[DateTests JSDateToNSDateTest]): 12 (+[DateTests roundTripThroughJSDateTest]): 13 This test only works with the en_US locale. 14 15 * shell/CMakeLists.txt: 16 * shell/PlatformMac.cmake: 17 Some of tests rely on ARC. We enable ARC for those files. 18 19 * shell/PlatformWin.cmake: 20 Clean up. 21 1 22 2017-05-19 Mark Lam <mark.lam@apple.com> 2 23 -
trunk/Source/JavaScriptCore/shell/CMakeLists.txt
r216914 r217182 17 17 endif () 18 18 19 set(TESTAPI_SOURCES 20 ../API/tests/CompareAndSwapTest.cpp 21 ../API/tests/CustomGlobalObjectClassTest.c 22 ../API/tests/ExecutionTimeLimitTest.cpp 23 ../API/tests/FunctionOverridesTest.cpp 24 ../API/tests/GlobalContextWithFinalizerTest.cpp 25 ../API/tests/JSONParseTest.cpp 26 ../API/tests/JSObjectGetProxyTargetTest.cpp 27 ../API/tests/MultithreadedMultiVMExecutionTest.cpp 28 ../API/tests/PingPongStackOverflowTest.cpp 29 ../API/tests/TypedArrayCTest.cpp 30 ../API/tests/testapi.c 31 ) 32 19 33 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() 20 34 21 35 WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES}) 36 WEBKIT_WRAP_SOURCELIST(${TESTAPI_SOURCES}) 22 37 include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES}) 23 38 include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}) … … 56 71 target_link_libraries(testair ${JSC_LIBRARIES}) 57 72 58 set(TESTAPI_SOURCES59 ../API/tests/CompareAndSwapTest.cpp60 ../API/tests/CustomGlobalObjectClassTest.c61 ../API/tests/ExecutionTimeLimitTest.cpp62 ../API/tests/FunctionOverridesTest.cpp63 ../API/tests/GlobalContextWithFinalizerTest.cpp64 ../API/tests/JSONParseTest.cpp65 ../API/tests/JSObjectGetProxyTargetTest.cpp66 ../API/tests/MultithreadedMultiVMExecutionTest.cpp67 ../API/tests/PingPongStackOverflowTest.cpp68 ../API/tests/TypedArrayCTest.cpp69 ../API/tests/testapi.c70 )71 73 add_executable(testapi ${TESTAPI_SOURCES}) 72 74 target_link_libraries(testapi ${JSC_LIBRARIES}) 75 endif () 73 76 74 file(COPY 75 "${JAVASCRIPTCORE_DIR}/API/tests/testapi.js" 76 DESTINATION 77 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 78 ) 79 file(COPY 80 "${JAVASCRIPTCORE_DIR}/API/tests/testapi-function-overrides.js" 81 DESTINATION 82 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 83 ) 84 endif () 77 file(COPY 78 "${JAVASCRIPTCORE_DIR}/API/tests/testapi.js" 79 DESTINATION 80 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 81 ) 82 file(COPY 83 "${JAVASCRIPTCORE_DIR}/API/tests/testapi-function-overrides.js" 84 DESTINATION 85 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 86 ) -
trunk/Source/JavaScriptCore/shell/PlatformMac.cmake
r216924 r217182 1 list(APPEND TESTAPI_SOURCES1 set(TESTAPI_OBJC_SOURCES 2 2 ../API/tests/CurrentThisInsideBlockGetterTest.mm 3 3 ../API/tests/DateTests.mm … … 7 7 ../API/tests/testapi.mm 8 8 ) 9 list(APPEND TESTAPI_SOURCES ${TESTAPI_OBJC_SOURCES}) 10 11 set_source_files_properties(${TESTAPI_OBJC_SOURCES} PROPERTIES COMPILE_FLAGS -fobjc-arc) -
trunk/Source/JavaScriptCore/shell/PlatformWin.cmake
r216460 r217182 26 26 target_link_libraries(testRegExpLib JavaScriptCore) 27 27 28 add_library(testapiLib SHARED 29 ../API/tests/CompareAndSwapTest.cpp 30 ../API/tests/CustomGlobalObjectClassTest.c 31 ../API/tests/ExecutionTimeLimitTest.cpp 32 ../API/tests/FunctionOverridesTest.cpp 33 ../API/tests/GlobalContextWithFinalizerTest.cpp 34 ../API/tests/JSONParseTest.cpp 35 ../API/tests/JSObjectGetProxyTargetTest.cpp 36 ../API/tests/PingPongStackOverflowTest.cpp 37 ../API/tests/MultithreadedMultiVMExecutionTest.cpp 38 ../API/tests/testapi.c 39 ../API/tests/TypedArrayCTest.cpp 40 ) 28 add_library(testapiLib SHARED ${TESTAPI_SOURCES}) 41 29 set_source_files_properties(../API/tests/CustomGlobalObjectClassTest.c PROPERTIES COMPILE_FLAGS "/TP /MT") 42 30 set_source_files_properties(../API/tests/testapi.c PROPERTIES COMPILE_FLAGS "/TP /MT") … … 46 34 add_dependencies(testapi testapiLib) 47 35 target_link_libraries(testapiLib JavaScriptCore) 48 49 file(COPY50 "${JAVASCRIPTCORE_DIR}/API/tests/testapi.js"51 DESTINATION52 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}53 )54 file(COPY55 "${JAVASCRIPTCORE_DIR}/API/tests/testapi-function-overrides.js"56 DESTINATION57 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}58 )
Note: See TracChangeset
for help on using the changeset viewer.