| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An RPGLE unit testing framework
This is the easiest way to obtain IBMiUnit; everyone has a Git client, right?
You can keep up-to-date with IBMiUnit by pulling from the repository and re-building.
ctl-opt bndDir( 'IBMIUNIT/IBMIUNIT' );
/copy IBMiUnit/QRPGLESRC,IBMiUnit_H
// test initialization/registration
IBMiUnit_setupSuite( 'TextUtil Tests' );
IBMiUnit_addTestCase( %pAddr( toUpperCase_fromLower ) : 'toUpperCase_fromLower' );
IBMiUnit_teardownSuite();
return;
// test cases
dcl-proc toUpperCase_fromLower;
assertCharEquals( 'MARINA SCHWENK'
: toUpperCase( 'marina schwenk' ) // defined in service program
);
end-proc;
A successful test example:
> ibmiunit/rununit qtehdr_t All 2 tests ran successfully
A test with a failure:
> ibmiunit/rununit qtehdr_t
assertion failure in calculateSurcharges_changeOrder: Number of tariff
items expected:<1> but was:<2>
Done: 0 errors, 1 failures, 1 successful test(s)
(TODO)
| Back | FazBrowse Home | New Git URL |