Overview
Comment: | Migrate OFPluginTests to ObjFWTest |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | objfwtest |
Files: | files | file ages | folders |
SHA3-256: |
540160ff203a2a04c70195dccd686c45 |
User & Date: | js on 2024-02-11 12:24:10 |
Other Links: | branch diff | manifest | tags |
Context
2024-02-11
| ||
12:28 | Migrate OFColorTests to ObjFWTest check-in: 5cbecd8453 user: js tags: objfwtest | |
12:24 | Migrate OFPluginTests to ObjFWTest check-in: 540160ff20 user: js tags: objfwtest | |
12:17 | OFPropertyListTests: Use OTAssertThrowsSpecific check-in: 3b440aa16a user: js tags: objfwtest | |
Changes
Modified new_tests/Makefile from [b432a17b87] to [8649fe6555].
1 2 3 | PROG_NOINST = tests${PROG_SUFFIX} SRCS = OFNumberTests.m \ OFPBKDF2Tests.m \ | > > > > | > > < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | include ../extra.mk SUBDIRS = ${TESTPLUGIN} PROG_NOINST = tests${PROG_SUFFIX} SRCS = OFNumberTests.m \ OFPBKDF2Tests.m \ OFPropertyListTests.m \ ${USE_SRCS_PLUGINS} SRCS_PLUGINS = OFPluginTests.m include ../buildsys.mk .PHONY: run run-on-ios run-on-android run: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f objfw${OBJFW_LIB_MAJOR}.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR} |
︙ | ︙ |
Renamed and modified tests/OFPluginTests.m [278848818e] to new_tests/OFPluginTests.m [686786627c].
︙ | ︙ | |||
11 12 13 14 15 16 17 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" | | > < | < < | < < | | < > | > > > > | > < | | < > | | < < | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "ObjFW.h" #import "ObjFWTest.h" #import "plugin/TestPlugin.h" @interface OFPluginTests: OTTestCase @end @implementation OFPluginTests - (void)testPlugin { OFString *path; OFPlugin *plugin; Class (*class)(void); TestPlugin *test; #ifndef OF_IOS path = [OFPlugin pathForName: @"plugin/TestPlugin"]; #else path = [OFPlugin pathForName: @"PlugIns/TestPlugin"]; #endif OTAssertNotNil(path); plugin = [OFPlugin pluginWithPath: path]; OTAssertNotNil(plugin); class = (Class (*)(void))(uintptr_t)[plugin addressForSymbol: @"class"]; OTAssert(class != NULL); @try { test = [[class() alloc] init]; OTAssertEqual([test test: 1234], 2468); } @finally { [test release]; } } @end |
Name change from tests/plugin/Info.plist.in to new_tests/plugin/Info.plist.in.
︙ | ︙ |
Name change from tests/plugin/Makefile to new_tests/plugin/Makefile.
︙ | ︙ |
Name change from tests/plugin/TestPlugin.h to new_tests/plugin/TestPlugin.h.
︙ | ︙ |
Name change from tests/plugin/TestPlugin.m to new_tests/plugin/TestPlugin.m.
︙ | ︙ |
Modified tests/Makefile from [85de92b1ac] to [5901b6f9c4].
1 2 | include ../extra.mk | < | | 1 2 3 4 5 6 7 8 9 10 | include ../extra.mk SUBDIRS = ${OBJC_SYNC} \ ${SUBPROCESS} \ terminal CLEAN = EBOOT.PBP \ boot.dol \ ${PROG_NOINST}.arm9 \ ${PROG_NOINST}.nds \ |
︙ | ︙ | |||
53 54 55 56 57 58 59 | OFXMLElementBuilderTests.m \ OFXMLNodeTests.m \ OFXMLParserTests.m \ RuntimeTests.m \ ${RUNTIME_ARC_TESTS_M} \ TestsAppDelegate.m \ ${USE_SRCS_FILES} \ | < < | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | OFXMLElementBuilderTests.m \ OFXMLNodeTests.m \ OFXMLParserTests.m \ RuntimeTests.m \ ${RUNTIME_ARC_TESTS_M} \ TestsAppDelegate.m \ ${USE_SRCS_FILES} \ ${USE_SRCS_SOCKETS} \ ${USE_SRCS_SUBPROCESS} \ ${USE_SRCS_THREADS} \ ${USE_SRCS_WINDOWS} \ testfile_bin.m \ testfile_ini.m SRCS_SOCKETS = OFDNSResolverTests.m \ ${OF_HTTP_CLIENT_TESTS_M} \ OFHTTPCookieTests.m \ OFHTTPCookieManagerTests.m \ OFKernelEventObserverTests.m \ OFSocketTests.m \ OFTCPSocketTests.m \ |
︙ | ︙ | |||
149 150 151 152 153 154 155 | rm -f libobjfw.${OBJFW_LIB_MAJOR}.dylib; \ rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \ rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \ rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \ rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \ exit $$EXIT | < < < < < < < < < < < < < < < < < < < < < < | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | rm -f libobjfw.${OBJFW_LIB_MAJOR}.dylib; \ rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \ rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \ rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \ rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \ exit $$EXIT run-on-android: all echo "Uploading files to Android device..." if test -f ../src/libobjfw.so; then \ adb push ../src/libobjfw.so \ /data/local/tmp/objfw/libobjfw.so.${OBJFW_LIB_MAJOR}; \ fi if test -f ../src/runtime/libobjfwrt.so; then \ adb push ../src/runtime/libobjfwrt.so \ /data/local/tmp/objfw/libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \ fi adb push tests /data/local/tmp/objfw/tests adb push testfile.txt /data/local/tmp/objfw/testfile.txt echo "Running tests binary on Android device..." adb shell 'cd /data/local/tmp/objfw && LD_LIBRARY_PATH=. exec ${WRAPPER} ./tests' EBOOT.PBP: ${PROG_NOINST} psp-fixup-imports ${PROG_NOINST} mksfo "ObjFW Tests" PARAM.SFO psp-strip ${PROG_NOINST} |
︙ | ︙ |