tools-xctest
is a testing framework for Objective-C, providing functionalities identical to Apple's XCTest. It is designed for use with the GNUstep development environment. This framework allows developers to write and run unit tests for their Objective-C code in a way that is familiar to those accustomed to XCTest in Apple's ecosystem.
- GNUstep Base
- GNUstep Make
- GNUstep Base
- GNUstep Make
- Run
meson setup build
- Build XCTest with
ninja -C build
- Install XCTest with
ninja -C build install
- Run
make
to build the project. - Run
make install
to installtools-xctest
on your system.
To use tools-xctest
, include the header files in your test classes and link against the tools-xctest
library. The usage is similar to Apple's XCTest:
#import <XCTest/XCTest.h>
@interface MyTestCase : XCTestCase
@end
@implementation MyTestCase
- (void)testExample {
XCTAssertEqual(1 + 1, 2, @"Basic arithmetic doesn't seem to work!");
}
@end
You will need to compile the test cases into one or more bundles, as xctest
expects .bundle
's.
Tests can be run using the command line tool provided by tools-xctest
. This can be done by navigating to the directory containing your test cases and executing:
xctest [path to your test case bundle]
tools-xctest
is licensed under LGPL-2.1. Please refer to the COPYING.LIB file for detailed information. For files not explicitly licensed, they fall under the same LGPL.
Contributions to tools-xctest
are welcome. Please submit pull requests or issues through the GitHub repository.