cant run unittests

dom via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 13 12:41:53 PDT 2016


how can i run my unittests for a dynamic library? some weird 
conflict is reported between main functions, my project doesnt 
contain any main function.

i really love D, but problems like this make me wanna switch :/

using:
dub test --arch=x86

lucy ~master: building configuration "__test__library__"...
../../tmp/dub_test_root-0ce1acbf-ecb9-4abf-8199-e7a23bd783dc.d(21,12): Error: function D main conflicts with static import dub_test_root.main at ../../tmp/dub_test_root-0ce1acbf-ecb9-4abf-8199-e7a23bd783dc.d(11,15)
dmd failed with exit code 1.

dub.json
{
	"name": "lucy",
	"description": "A minimal D application.",
	"copyright": "Copyright © 2015, dom",
	"authors": ["dom"],
	"targetType": "dynamicLibrary",
	"dflags": ["-fPIC"],
	"dependencies": {
		"msgpack-d": "~>1.0.0-beta.2",
		"poodinis": "~>6.3.0"
	}
}


More information about the Digitalmars-d-learn mailing list