• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode and CppUnit template TestCaller<>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode and CppUnit template TestCaller<>


  • Subject: Re: XCode and CppUnit template TestCaller<>
  • From: Olger Warnier <email@hidden>
  • Date: Thu, 13 Nov 2003 20:57:03 +0100

Hi Christoper,

Can't help you with 1.8.0, but I've 1.9.11 working with Xcode.
I use the DllPlugInTester to run the tests.

The 1.9.11 contains an example (in the cppunit-1.9.11/examples/simple directory)
These samples use Macro's to create the testsuite and add the tests to list of tests and works pretty easy.


Add these to a seperate target and build it with the next settings:

HEADER_SEARCH_PATHS = "/opt/cppunit/include"
LIBRARY_SEARCH_PATHS = /opt/cppunit/lib
LIBRARY_STYLE = Dynamic
DYLIB_CURRENT_VERSION = 1
DYLIB_COMPATIBILITY_VERSION = 1
WARNING_LDFLAGS = "-undefined warning"
OTHER_LDFLAGS = "-flat_namespace -single_module -lcppunit"
DEPLOYMENT_LOCATION = NO
GCC_OPTIMIZATION_LEVEL = 0
GCC_GENERATE_PROFILING_CODE = YES
GCC_WARN_UNKNOWN_PRAGMAS = NO
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO
Header search paths = "/opt/cppunit/include"
INSTALL_PATH = lib
OTHER_CFLAGS =
OTHER_REZFLAGS =
PRODUCT_NAME = libccutil_unittests
SECTORDER_FLAGS =
TARGET_BUILD_DIR =
WARNING_CFLAGS = -Wmost

It will create a dynamic library that will run via the CPPUNIT_HOME/bin/DllPlugInTester
That will load the dylib and runs the tests.
In order to run, you need to create a custom executable with the next settings:


path to executable:
/opt/cppunit/bin/DllPlugInTester
Arguments
lib/libeibxml_unittests.dylib
Environment variables
DYLD_LIBRARY_PATH = lib:/opt/cppunit/lib

I tried to use some arguments here like:
arguments = lib/$(PRODUCT_NAME).dylib, but that doesn't work. So this custom executable works only for one unittest library target. :(
Did not find a way to do it like this yet, so If you know how to deal with it, please let me know.


Good luck,

Olger



On Nov 13, 2003, at 12:15 AM, Christopher Corbell wrote:

Has anyone had any luck using CppUnit 1.8.0 with XCode,
and can you mention if there are any particular language
settings needed?  I get compile errors using TestCaller<> template
instantiation to add fixtures to a suite - the compiler says
it can't find the right constructor, and hilites a private
constructor in the header that's nowhere close - I'm
using the standard (string, function) public constructor, e.g.
  pSuite->AddTest( new CppUnit::TestCaller<aClass>("atest", aTest) );

The CppUnit distro builds fine from command-line gcc3.
From XCode I tried both using the config-make-install .a
library with headers in /usr/local/include, and just using
config'd sources directly in an XCode project, with the same
result - the problem seems to be in the parsing of the template?

Thanks for any help,
Christopher
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

References: 
 >XCode and CppUnit template TestCaller<> (From: Christopher Corbell <email@hidden>)

  • Prev by Date: Re: "project and editor" window configuration
  • Next by Date: Editing Styles
  • Previous by thread: hmap file questions
  • Next by thread: Re: XCode and CppUnit template TestCaller<>
  • Index(es):
    • Date
    • Thread