35/39(89%) line coverage

      
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
241
251
261
271
280
291
300
310
320
330
340
350
360
371
380
390
401
410
420
430
440
451
460
470
480
491
500
510
521
531
541
551
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730
740
750
760
770
780
790
801
810
820
830
840
850
860
870
881
890
900
911
920
930
940
950
960
970
980
990
1001
1010
1020
1030
1040
1050
1060
1071
1080
1090
1100
1110
1120
1130
1140
1150
1160
1170
1180
1190
1200
1210
1220
1230
1240
1250
1260
1270
1280
1290
1300
1310
1320
1330
1340
1350
1360
1370
1380
1390
1400
1410
1420
1430
1440
1450
1460
1470
1480
1490
1500
1510
1520
1530
1540
1551
1560
1571
1580
1590
1600
1610
1620
1630
1640
1650
1660
1670
1680
1690
1700
1710
1720
1730
1740
1750
1760
1770
1780
1790
1800
1810
1820
1830
1840
1850
1860
1870
1880
1890
1901
1910
1920
1930
1940
1951
1961
1971
1981
1991
2001
2011
2021
2031
2041
2050
2061
2070
2080
2091
2100
2110
2120
2130
2142
2150
2160
2170
2180
2190
2200
2212
2220
import std.getopt; import std.string; import trial.discovery.unit; import trial.discovery.spec; import trial.discovery.testclass; import trial.runner; import trial.interfaces; import trial.settings; import trial.stackresult; import trial.reporters.result; import trial.reporters.stats; import trial.reporters.spec; import trial.reporters.specsteps; import trial.reporters.dotmatrix; import trial.reporters.landing; import trial.reporters.progress; import trial.reporters.xunit; import trial.reporters.tap; import trial.reporters.visualtrial; import trial.reporters.result; int main(string[] arguments) { string testName; string suiteName; string executor; string reporters; getopt( arguments, "testName|t", &testName, "suiteName|s", &suiteName, "executor|e", &executor, "reporters|r", &reporters ); auto settings = Settings(["spec", "result", "xunit"], ["trial.discovery.unit.UnitTestDiscovery"], 0, GlyphSettings(SpecGlyphs(`✓`), SpecStepsGlyphs(`┌`, `└`, `│`), TestResultGlyphs(`✖`), DotMatrixGlyphs(`.`,`!`,`?`), LandingGlyphs(`✈`,`━`,`⋅`), ProgressGlyphs(`░`,`▓`)), ".trial", 20, 100, [], ""); static if(__traits(hasMember, Settings, "executor")) { if(executor != "") { settings.executor = executor; } } if(reporters != "") { settings.reporters = reporters.split(","); } setupLifecycle(settings); StackResult.externalModules = ["ddmp.diff", "ddmp.match", "ddmp.patch", "ddmp.util", "dparse.ast", "dparse.entities", "dparse.formatter", "dparse.lexer", "dparse.parser", "dparse.rollback_allocator", "dparse.stack_buffer", "std.experimental.lexer", "stdx.allocator.building_blocks.affix_allocator", "stdx.allocator.building_blocks.allocator_list", "stdx.allocator.building_blocks.bitmapped_block", "stdx.allocator.building_blocks.bucketizer", "stdx.allocator.building_blocks.fallback_allocator", "stdx.allocator.building_blocks.free_list", "stdx.allocator.building_blocks.free_tree", "stdx.allocator.building_blocks.kernighan_ritchie", "stdx.allocator.building_blocks.null_allocator", "stdx.allocator.building_blocks", "stdx.allocator.building_blocks.quantizer", "stdx.allocator.building_blocks.region", "stdx.allocator.building_blocks.scoped_allocator", "stdx.allocator.building_blocks.segregator", "stdx.allocator.building_blocks.stats_collector", "stdx.allocator.common", "stdx.allocator.gc_allocator", "stdx.allocator.internal", "stdx.allocator.mallocator", "stdx.allocator.mmap_allocator", "It", "stdx.allocator.showcase", "stdx.allocator.typed", "trial.attributes", "trial.coverage", "trial.discovery.code", "trial.discovery.spec", "trial.discovery.testclass", "trial.discovery.unit", "trial.executor.parallel", "trial.executor.process", "trial.executor.single", "trial.interfaces", "trial.reporters.allure", "trial.reporters.dotmatrix", "trial.reporters.html", "trial.reporters.landing", "trial.reporters.list", "trial.reporters.progress", "trial.reporters.result", "trial.reporters.spec", "trial.reporters.specprogress", "trial.reporters.specsteps", "trial.reporters.stats", "trial.reporters.tap", "trial.reporters.visualtrial", "trial.reporters.writer", "trial.reporters.xunit", "trial.runner", "trial.settings", "trial.stackresult", "trial.step", "trial.terminal", "vibe.data.bson", "vibe.data.json", "vibe.data.serialization", "vibe.internal.memory_legacy", "vibe.internal.meta.all", "vibe.internal.meta.codegen", "vibe.internal.meta.funcattr", "vibe.internal.meta.traits", "vibe.internal.meta.typetuple", "vibe.internal.meta.uda", "vibe.internal.rangeutil", "vibe.internal.utilallocator", "vibe.internal.win32", "vibe.utils.array", "vibe.utils.dictionarylist", "vibe.utils.hashmap", "vibe.utils.memory", "vibe.utils.string", "vibe.utils.validation", "vibe.http.auth.basic_auth", "vibe.http.auth.digest_auth", "vibe.http.client", "vibe.http.common", "vibe.http.dist", "vibe.http.fileserver", "vibe.http.form", "vibe.http.log", "vibe.http.proxy", "vibe.http.router", "vibe.http.server", "vibe.http.session", "vibe.http.status", "vibe.http.websockets", "diet.defs", "diet.dom", "diet.html", "diet.input", "diet.internal.html", "diet.internal.string", "diet.parser", "diet.traits", "vibe.crypto.cryptorand", "vibe.crypto.passwordhash", "vibe.core.args", "vibe.core.concurrency", "vibe.core.connectionpool", "vibe.core.core", "vibe.core.file", "vibe.core.log", "vibe.core.net", "vibe.core.path", "vibe.core.stream", "vibe.core.sync", "vibe.core.task", "vibe.core.taskpool", "vibe.internal.allocator", "vibe.internal.array", "vibe.internal.async", "vibe.internal.freelistref", "vibe.internal.hashmap", "vibe.internal.interfaceproxy", "vibe.internal.list", "vibe.internal.string", "vibe.internal.traits", "vibe.internal.typetuple", "eventcore.core", "eventcore.driver", "eventcore.drivers.libasync", "eventcore.drivers.posix.dns", "eventcore.drivers.posix.driver", "eventcore.drivers.posix.epoll", "eventcore.drivers.posix.events", "eventcore.drivers.posix.kqueue", "eventcore.drivers.posix.select", "eventcore.drivers.posix.signals", "eventcore.drivers.posix.sockets", "eventcore.drivers.posix.watchers", "eventcore.drivers.threadedfile", "eventcore.drivers.timer", "eventcore.drivers.winapi.core", "eventcore.drivers.winapi.dns", "eventcore.drivers.winapi.driver", "eventcore.drivers.winapi.events", "eventcore.drivers.winapi.files", "eventcore.drivers.winapi.signals", "eventcore.drivers.winapi.sockets", "eventcore.drivers.winapi.watchers", "eventcore.internal.consumablequeue", "eventcore.internal.dlist", "eventcore.internal.utils", "eventcore.internal.win32", "eventcore.socket", "taggedalgebraic", "vibe.inet.message", "vibe.inet.mimetypes", "vibe.inet.path", "vibe.inet.url", "vibe.inet.urltransfer", "vibe.inet.webform", "vibe.stream.base64", "vibe.stream.counting", "vibe.stream.memory", "vibe.stream.multicast", "vibe.stream.operations", "vibe.stream.stdio", "vibe.stream.taskpipe", "vibe.stream.wrapper", "vibe.stream.zlib", "vibe.textfilter.html", "vibe.textfilter.markdown", "vibe.textfilter.urlencode", "vibe.stream.botan", "vibe.stream.openssl", "vibe.stream.tls", "_d_assert", "std.", "core."]; auto testDiscovery0 = new UnitTestDiscovery; static if(__traits(hasMember, UnitTestDiscovery, "comments")) { UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluent/asserts.d"] = []; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/array.d"] = [Comment(111, "ListComparison should be able to get the missing elements"), Comment(123, "ListComparison should be able to get the missing elements with duplicates"), Comment(133, "ListComparison should be able to get the extra elements"), Comment(145, "ListComparison should be able to get the extra elements with duplicates"), Comment(155, "ListComparison should be able to get the common elements"), Comment(166, "ListComparison should be able to get the common elements with duplicates"), Comment(396, "When there is a lazy array that throws an it should throw that exception"), Comment(455, "const range contain"), Comment(467, "immutable range contain"), Comment(479, "contain only"), Comment(533, "contain only with void array"), Comment(540, "const range containOnly"), Comment(552, "immutable range containOnly"), Comment(564, "array contain"), Comment(619, "array equals"), Comment(666, "array equals with structs"), Comment(683, "const array equal"), Comment(704, "array equals with classes"), Comment(717, "range equals"), Comment(762, "custom range asserts"), Comment(806, "custom const range equals"), Comment(827, "custom immutable range equals"), Comment(848, "approximately equals"), Comment(867, "approximately equals with Assert"), Comment(873, "immutable string")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/base.d"] = [Comment(269, "Test Exception should sepparate the results by a new line"), Comment(504, "evaluate should capture an exception"), Comment(516, "evaluate should capture an exception thrown by a callable"), Comment(672, "Assert should work for base types"), Comment(699, "Assert should work for objects"), Comment(706, "Assert should work for strings"), Comment(727, "Assert should work for ranges"), Comment(753, "It should call the fluent handler")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/basetype.d"] = [Comment(149, "When there is a lazy number that throws an it should throw that exception"), Comment(355, "should throw exceptions for delegates that return basic types"), Comment(392, "it should compile const comparison")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/callable.d"] = [Comment(63, "Should be able to catch any exception"), Comment(71, "Should be able to catch any assert"), Comment(78, "Should be able to use with message without a custom assert"), Comment(85, "Should be able to catch a certain exception type"), Comment(112, "Should be able to retrieve a typed version of a custom exception"), Comment(134, "Should print a nice message for exception message asserts"), Comment(157, "Should fail if an exception is not thrown"), Comment(171, "Should fail if an exception is not expected"), Comment(214, "It should check if a delagate is null")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/objects.d"] = [Comment(67, "When there is a lazy object that throws an it should throw that exception"), Comment(86, "object beNull"), Comment(112, "object instanceOf"), Comment(146, "object instanceOf interface"), Comment(178, "should throw exceptions for delegates that return basic types"), Comment(202, "object equal"), Comment(230, "null object comparison")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/results.d"] = [Comment(17, "Glyphs used to display special chars in the results"), Comment(23, "Glyph for the \\r char"), Comment(26, "Glyph for the \\n char"), Comment(29, "Glyph for the space char"), Comment(32, "Glyph for the \\0 char"), Comment(35, "Glyph that indicates the error line"), Comment(38, "Glyph that sepparates the line number"), Comment(41, "Glyph for the diff begin indicator"), Comment(44, "Glyph for the diff end indicator"), Comment(47, "Glyph that marks an inserted text in diff"), Comment(50, "Glyph that marks deleted text in diff"), Comment(54, "Set the default values. The values are"), Comment(84, ""), Comment(141, "This is the most simple implementation of a ResultPrinter. All the plain data is printed to stdout"), Comment(174, "A result that prints a simple message to the user"), Comment(352, "DiffResult should find the differences"), Comment(358, "DiffResult should use the custom glyphs"), Comment(492, "KeyResult should not dispaly spaces between words with special chars"), Comment(501, "KeyResult should dispaly spaces with special chars on space lines"), Comment(510, "KeyResult should display no char for empty lines"), Comment(519, "KeyResult should display special characters with different contexts"), Comment(529, "KeyResult should display custom glyphs with different contexts"), Comment(639, "A result that displays differences between ranges"), Comment(745, "Get the spec function and scope that contains a lambda"), Comment(760, "Get the a method scope and signature"), Comment(773, "Get the a method scope without assert"), Comment(790, "iterate the parameters"), Comment(834, "Get the end of a spec function with a lambda"), Comment(851, "Get the end of an unittest function with a lambda"), Comment(868, "Get tokens from a scope that contains a lambda"), Comment(943, "Get the the previous unittest identifier from a list of tokens"), Comment(955, "Get the the previous paranthesis identifier from a list of tokens"), Comment(969, "Get the the previous function call identifier from a list of tokens"), Comment(983, "Get the the previous map!\"\" identifier from a list of tokens"), Comment(1010, "Get the index of the Assert structure identifier from a list of tokens"), Comment(1051, "Get the first parameter from a list of tokens"), Comment(1061, "Get the first list parameter from a list of tokens"), Comment(1071, "Get the previous array identifier from a list of tokens"), Comment(1084, "Get the previous array of instances identifier from a list of tokens"), Comment(1111, "Get the index of the should call"), Comment(1125, "An alternative to SourceResult that uses DParse to get the source code"), Comment(1339, "Converts a file to D tokens provided by libDParse. All the whitespaces are ignored"), Comment(1461, "Source reporter should print the source code"), Comment(1477, "split multiline tokens in multiple single line tokens with the same type"), Comment(1500, "A new line sepparator"), Comment(1585, "convert to string the added data to ListInfoResult"), Comment(1599, "print the added data to ListInfoResult"), Comment(1617, "convert to string the added data lists to ListInfoResult")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/string.d"] = [Comment(188, "When there is a lazy string that throws an it should throw that exception"), Comment(419, "should throw exceptions for delegates that return basic types")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/vibe/json.d"] = [Comment(14, "Get all the keys from your Json object"), Comment(38, "Empty Json object keys"), Comment(43, "Json object keys"), Comment(52, "Json array keys"), Comment(61, "Get all the keys from your Json object. The levels will be sepparated by `.` or `[]`"), Comment(66, "Empty Json object keys"), Comment(71, "Get all keys from nested object"), Comment(87, "Get all keys from nested objects inside an array"), Comment(105, "Takes a nested Json object and moves the values to a Json assoc array where the key is the path from the original object to that value"), Comment(160, "Get a flatten object"), Comment(555, "It should be able to compare 2 empty json objects"), Comment(560, "It should be able to compare an empty object with an empty array"), Comment(575, "It should be able to compare two strings"), Comment(600, "It throw on comparing a Json number with a string"), Comment(611, "It throws when you compare a Json string with integer values"), Comment(644, "It throws when you compare a Json string with unsigned integer values"), Comment(675, "It throws when you compare a Json string with floating point values"), Comment(694, "It throws when you compare a Json string with bool values"), Comment(705, "It should be able to compare two integers"), Comment(728, "It throws on comparing an integer Json with a string"), Comment(743, "It should be able to compare two floating point numbers"), Comment(765, "It throws on comparing an floating point Json with a string"), Comment(780, "It should be able to compare two booleans"), Comment(801, "It throws on comparing a bool Json with a string"), Comment(816, "It should be able to compare two arrays"), Comment(840, "It throws on comparing a Json array with a string"), Comment(856, "It should be able to compare two nested arrays"), Comment(883, "It should be able to compare two nested arrays with different levels"), Comment(909, "It should find the key differences inside a Json object"), Comment(947, "It should find the value differences inside a Json object"), Comment(984, "greaterThan support for Json Objects"), Comment(1009, "lessThan support for Json Objects"), Comment(1034, "between support for Json Objects")]; UnitTestDiscovery.comments["/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/vibe/request.d"] = [Comment(20, "@safe:"), Comment(483, "@(\"Sending form data\") unittest { auto router = new URLRouter();"), Comment(576, "Check for the exact header value:"), Comment(597, "Check if a header exists"), Comment(611, "Check if a header contains a string")]; } testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluent/asserts.d`, `fluent.asserts`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/array.d`, `fluentasserts.core.array`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/base.d`, `fluentasserts.core.base`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/basetype.d`, `fluentasserts.core.basetype`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/callable.d`, `fluentasserts.core.callable`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/objects.d`, `fluentasserts.core.objects`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/results.d`, `fluentasserts.core.results`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/core/string.d`, `fluentasserts.core.string`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/vibe/json.d`, `fluentasserts.vibe.json`); testDiscovery0.addModule!(`/builds/szabobogdan3/fluent-asserts-coverage/fluent-asserts/source/fluentasserts/vibe/request.d`, `fluentasserts.vibe.request`); LifeCycleListeners.instance.add(testDiscovery0); if(arguments.length > 1 && arguments[1] == "describe") { import std.stdio; describeTests.toJSONHierarchy.write; return 0; } else { return runTests(LifeCycleListeners.instance.getTestCases, testName, suiteName).isSuccess ? 0 : 1; } } version (unittest) shared static this() { import core.runtime; Runtime.moduleUnitTester = () => true; }