[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loading bundles in unitkit
From: |
edwin ancaer |
Subject: |
loading bundles in unitkit |
Date: |
Tue, 10 Oct 2017 21:12:18 +0200 |
User-agent: |
GNUMail (Version 1.2.2) |
Hello,
so I am trying to use UnitKit objects and methods to create an
application like Test Runner in Smalltalk.
To start, I created some tests in a bundle Money.bundle, and used the
ukrun-tool, with as result:
== --- loadBundleAtPath
/usr/home/edwin/Objc/First/Money/Money.bundle
2017-10-10 16:49:17.862 ukrun[9706:100099] UKRunner.m /
RuntestsWithClassNames:InBundle:principalClass:
2017-10-10 16:49:18.004 ukrun[9706:100099] UKRuner.m / testclassnames
= (MoneyTest)
2017-10-10 16:49:18.009 ukrun[9706:100099] UKRunner.m == filter test :
(null)
2017-10-10 16:49:18.013 ukrun[9706:100099] UKRunner.m == classname is
MoneyTest
2017-10-10 16:49:18.017 ukrun[9706:100099] UKRunner.m == running tests
in class MoneyTest
2017-10-10 16:49:18.023 ukrun[9706:100099] === [MoneyTest
testEquality] ===
2017-10-10 16:49:18.029 ukrun[9706:100099] == internalRunTest
2017-10-10 16:49:18.034 ukrun[9706:100099] MoneyTest.m:51
msgUKTrue.pass
2017-10-10 16:49:18.038 ukrun[9706:100099] MoneyTest.m:52
msgUKTrue.pass
2017-10-10 16:49:18.043 ukrun[9706:100099] MoneyTest.m:53
msgUKFalse.pass
2017-10-10 16:49:18.047 ukrun[9706:100099] MoneyTest.m:54
msgUKFalse.pass
2017-10-10 16:49:18.052 ukrun[9706:100099] MoneyTest.m:55
msgUKFalse.pass
2017-10-10 16:49:18.056 ukrun[9706:100099] === [MoneyTest
testFrancMultiplication] ===
2017-10-10 16:49:18.060 ukrun[9706:100099] == internalRunTest
2017-10-10 16:49:18.065 ukrun[9706:100099] MoneyTest.m:46
msgUKIntsEqual.pass
2017-10-10 16:49:18.069 ukrun[9706:100099] === [MoneyTest
testMultiplication] ===
2017-10-10 16:49:18.074 ukrun[9706:100099] == internalRunTest
2017-10-10 16:49:18.079 ukrun[9706:100099] MoneyTest.m:39
msgUKIntsEqual.pass
2017-10-10 16:49:18.083 ukrun[9706:100099] Took 220 ms
2017-10-10 16:49:18.099 ukrun[9706:100099] Result: 1 classes, 3
methods, 7 tests, 0 failed, 0 exceptions
As second step, I created the application with Gorm and ProjectCenter:
just 1 window with a button and a text field. When the button is
pushed, the tests in the bundle should be executed, and the test field
will contain the string "Tests are finished". Therefore, I created
the following code in the Controller class for the window:
created
testRunner = [[UKRunner alloc] init];
testBundle = [testRunner loadBundleAtPath: bundlePath];
[testRunner runTestsInBundle: testBundle];
result = [testRunner reportTestResults];
I kind of hoped for the same result as with ukrun, but to my surprise,
even the loading of the bundle already gave a different result.
2017-10-10 20:53:56.660 Money2[10551:100142] == --- loadBundleAtPath
/usr/home/edwin/Objc/First/Money/Money.bundle
Loading two versions of Money. The class that will be used is
undefined
Loading two versions of Franc. The class that will be used is
undefined
Loading two versions of Dollar. The class that will be used is
undefined
Loading two versions of MoneyTest. The class that will be used is
undefined
2017-10-10 20:53:56.676 Money2[10551:100142] Money2 == 1. bundle is
<NSBundle: 0x29ec6310> </usr/home/edwin/Objc/First/Money/Money.bundle>
(loaded) with principal class Money
2017-10-10 20:53:56.679 Money2[10551:100142] UKRunner.m /
RuntestsWithClassNames:InBundle:principalClass:
2017-10-10 20:53:56.946 Money2[10551:100142] UKRuner.m /
testclassnames = ()
2017-10-10 20:53:56.949 Money2[10551:100142] Took 269 ms
2017-10-10 20:53:56.952 Money2[10551:100142] Money2 == testrun ended
2017-10-10 20:53:56.955 Money2[10551:100142] Result: 0 classes, 0
methods, 0 tests, 0 failed, 0 exceptions
2017-10-10 20:53:56.958 Money2[10551:100142] Money2 == result of
testrun is 0
Already stuck from the beginning... I'm sure it's a stupid error I'm
making, but I see no way out. Can anyone give a probable cause of this
behaviour, or can't I use UnitKit from an application?
Kind regards,
Edwin
- loading bundles in unitkit,
edwin ancaer <=