Overview
Comment: | Migration of OFXMLElement tests to new testing framework. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2437d2d0be4adbd15ae35a3e02b2eef7 |
User & Date: | js on 2009-09-30 13:33:37 |
Other Links: | manifest | tags |
Context
2009-09-30
| ||
15:01 | Migration of OFDataArray tests to new testing framework. check-in: e7a372fea9 user: js tags: trunk | |
13:33 | Migration of OFXMLElement tests to new testing framework. check-in: 2437d2d0be user: js tags: trunk | |
13:23 | Migration of OFTCPSocket tests to new testing framework. check-in: 67cf530ed3 user: js tags: trunk | |
Changes
Modified tests/Makefile from [843c47a19e] to [0ad94f9883].
1 2 3 4 5 6 | include ../extra.mk SUBDIRS = OFDataArray \ OFHashes \ ${OFPLUGIN} \ OFThread \ | < | 1 2 3 4 5 6 7 8 9 10 | include ../extra.mk SUBDIRS = OFDataArray \ OFHashes \ ${OFPLUGIN} \ OFThread \ OFXMLParser \ ${OBJC_SYNC} include ../buildsys.mk |
Deleted tests/OFXMLElement/Makefile version [e5f5abe055].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted tests/OFXMLElement/OFXMLElement.m version [6153658720].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified tests_new/Makefile from [0c23107fa9] to [98d32fa459].
1 2 3 4 5 6 7 | PROG_NOINST = tests${PROG_SUFFIX} SRCS = array.m \ dictionary.m \ list.m \ main.m \ object.m \ string.m \ | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | PROG_NOINST = tests${PROG_SUFFIX} SRCS = array.m \ dictionary.m \ list.m \ main.m \ object.m \ string.m \ tcpsocket.m \ xmlelement.m include ../buildsys.mk include ../extra.mk CPPFLAGS += -I../src -I.. -DSTDOUT LIBS := -L../src -lobjfw ${LIBS} |
︙ | ︙ |
Modified tests_new/main.m from [144512e59e] to [8a5fa64125].
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | extern void array_tests(); extern void dictionary_tests(); extern void list_tests(); extern void object_tests(); extern void string_tests(); extern void tcpsocket_tests(); static int fails = 0; static void output(OFString *str, int color) { #ifdef STDOUT | > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | extern void array_tests(); extern void dictionary_tests(); extern void list_tests(); extern void object_tests(); extern void string_tests(); extern void tcpsocket_tests(); extern void xmlelement_tests(); static int fails = 0; static void output(OFString *str, int color) { #ifdef STDOUT |
︙ | ︙ | |||
91 92 93 94 95 96 97 98 99 100 | { object_tests(); string_tests(); array_tests(); dictionary_tests(); list_tests(); tcpsocket_tests(); return fails; } | > | 92 93 94 95 96 97 98 99 100 101 102 | { object_tests(); string_tests(); array_tests(); dictionary_tests(); list_tests(); tcpsocket_tests(); xmlelement_tests(); return fails; } |
Added tests_new/xmlelement.m version [374a7a3822].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #include "config.h" #import "OFXMLElement.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" #import "main.h" static OFString *module = @"OFXMLElement"; void xmlelement_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFXMLElement *elem[2]; TEST(@"+[elementWithName:]", (elem[0] = [OFXMLElement elementWithName: @"foo"]) && [[elem[0] string] isEqual: @"<foo/>"]) TEST(@"+[elementWithName:stringValue:]", (elem[1] = [OFXMLElement elementWithName: @"foo" stringValue: @"b&ar"]) && [[elem[1] string] isEqual: @"<foo>b&ar</foo>"]) TEST(@"-[addAttributeWithName:stringValue:]", [elem[0] addAttributeWithName: @"foo" stringValue: @"b&ar"] && [[elem[0] string] isEqual: @"<foo foo='b&ar'/>"] && [elem[1] addAttributeWithName: @"foo" stringValue: @"b&ar"] && [[elem[1] string] isEqual: @"<foo foo='b&ar'>b&ar</foo>"]) TEST(@"-[addChild", [elem[0] addChild: [OFXMLElement elementWithName: @"bar"]] && [[elem[0] string] isEqual: @"<foo foo='b&ar'><bar/></foo>"]) [pool release]; } |