-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
197 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,7 @@ __dummy.html | |
dub.selections.json | ||
|
||
__test__library__ | ||
|
||
vibe-dav | ||
|
||
vibe-dav.sublime-project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[ | ||
{"name": "basic check for getHeaderValue", "qualifiedName": "vibedav.base.__unittestL50_1", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 7e-06}, {"name": "gcUsedSize", "value": 0, "timestamp": 7e-06}, {"name": "gcFreeListSize", "value": 0, "timestamp": 7e-06}], "success": true, "duration": 7e-06}, | ||
{"name": "getHeaderValue with default value", "qualifiedName": "vibedav.base.__unittestL58_2", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2e-06}, {"name": "gcUsedSize", "value": 0, "timestamp": 2e-06}, {"name": "gcFreeListSize", "value": 0, "timestamp": 2e-06}], "success": true, "duration": 2e-06}, | ||
{"name": "check if getHeaderValue fails", "qualifiedName": "vibedav.base.__unittestL65_3", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.1e-05}, {"name": "gcUsedSize", "value": 2208, "timestamp": 2.1e-05}, {"name": "gcFreeListSize", "value": 1888, "timestamp": 2.1e-05}], "success": true, "duration": 2.1e-05}, | ||
{"name": "exists", "qualifiedName": "vibedav.file.DavFileResource.__unittestL168_4", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 0.002108}, {"name": "gcUsedSize", "value": 79040, "timestamp": 0.002108}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 0.002108}], "success": true, "duration": 0.002108}, | ||
{"name": "copy file", "qualifiedName": "vibedav.file.DavFileResource.__unittestL242_5", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 0.000517}, {"name": "gcUsedSize", "value": 21936, "timestamp": 0.000517}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 0.000517}], "success": true, "duration": 0.000517}, | ||
{"name": "copy dir", "qualifiedName": "vibedav.file.DavFileResource.__unittestL259_6", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 0.001104}, {"name": "gcUsedSize", "value": 63248, "timestamp": 0.001104}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 0.001104}], "success": true, "duration": 0.001104}, | ||
{"name": "string prop", "qualifiedName": "vibedav.prop.__unittestL333_7", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 1.1e-05}, {"name": "gcUsedSize", "value": 176, "timestamp": 1.1e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 1.1e-05}], "success": true, "duration": 1.1e-05}, | ||
{"name": "tag prop", "qualifiedName": "vibedav.prop.__unittestL339_8", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.6e-05}, {"name": "gcUsedSize", "value": 2592, "timestamp": 2.6e-05}, {"name": "gcFreeListSize", "value": 1504, "timestamp": 2.6e-05}], "success": true, "duration": 2.6e-05}, | ||
{"name": "check if tags can be accessed from other references", "qualifiedName": "vibedav.prop.__unittestL346_9", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.6e-05}, {"name": "gcUsedSize", "value": 4832, "timestamp": 2.6e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 2.6e-05}], "success": true, "duration": 2.6e-05}, | ||
{"name": "remove child tags", "qualifiedName": "vibedav.prop.__unittestL358_10", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.3e-05}, {"name": "gcUsedSize", "value": 7232, "timestamp": 2.3e-05}, {"name": "gcFreeListSize", "value": 960, "timestamp": 2.3e-05}], "success": true, "duration": 2.3e-05}, | ||
{"name": "filter tags by tag name", "qualifiedName": "vibedav.prop.__unittestL371_11", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 1.2e-05}, {"name": "gcUsedSize", "value": 656, "timestamp": 1.2e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 1.2e-05}], "success": true, "duration": 1.2e-05}, | ||
{"name": "set tag value property", "qualifiedName": "vibedav.prop.__unittestL389_12", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.3e-05}, {"name": "gcUsedSize", "value": 2592, "timestamp": 2.3e-05}, {"name": "gcFreeListSize", "value": 1504, "timestamp": 2.3e-05}], "success": true, "duration": 2.3e-05}, | ||
{"name": "set namespace attr", "qualifiedName": "vibedav.prop.__unittestL398_13", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 1.7e-05}, {"name": "gcUsedSize", "value": 2592, "timestamp": 1.7e-05}, {"name": "gcFreeListSize", "value": 1504, "timestamp": 1.7e-05}], "success": true, "duration": 1.7e-05}, | ||
{"name": "set a tag namesapace prefix", "qualifiedName": "vibedav.prop.__unittestL407_14", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.3e-05}, {"name": "gcUsedSize", "value": 2736, "timestamp": 2.3e-05}, {"name": "gcFreeListSize", "value": 1360, "timestamp": 2.3e-05}], "success": true, "duration": 2.3e-05}, | ||
{"name": "get tag prefix", "qualifiedName": "vibedav.prop.__unittestL416_15", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.3e-05}, {"name": "gcUsedSize", "value": 4960, "timestamp": 2.3e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 2.3e-05}], "success": true, "duration": 2.3e-05}, | ||
{"name": "add a tag with an unknown ns prefix", "qualifiedName": "vibedav.prop.__unittestL426_16", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 6e-05}, {"name": "gcUsedSize", "value": 9232, "timestamp": 6e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 6e-05}], "success": true, "duration": 6e-05}, | ||
{"name": "add same name tag with different ns", "qualifiedName": "vibedav.prop.__unittestL443_17", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2e-05}, {"name": "gcUsedSize", "value": 2640, "timestamp": 2e-05}, {"name": "gcFreeListSize", "value": 1456, "timestamp": 2e-05}], "success": true, "duration": 2e-05}, | ||
{"name": "get a namespace name from a prefixed tag", "qualifiedName": "vibedav.prop.__unittestL464_18", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.8e-05}, {"name": "gcUsedSize", "value": 4960, "timestamp": 2.8e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 2.8e-05}], "success": true, "duration": 2.8e-05}, | ||
{"name": "parse a string without any tags", "qualifiedName": "vibedav.prop.__unittestL728_19", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.3e-05}, {"name": "gcUsedSize", "value": 432, "timestamp": 2.3e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 2.3e-05}], "success": true, "duration": 2.3e-05}, | ||
{"name": "parse a string with a tag", "qualifiedName": "vibedav.prop.__unittestL734_20", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 3e-05}, {"name": "gcUsedSize", "value": 1120, "timestamp": 3e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 3e-05}], "success": true, "duration": 3e-05}, | ||
{"name": "parse a string without imbricated tags", "qualifiedName": "vibedav.prop.__unittestL742_21", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.6e-05}, {"name": "gcUsedSize", "value": 2128, "timestamp": 2.6e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 2.6e-05}], "success": true, "duration": 2.6e-05}, | ||
{"name": "parse a string with imbricated tags", "qualifiedName": "vibedav.prop.__unittestL750_22", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 5e-05}, {"name": "gcUsedSize", "value": 1824, "timestamp": 5e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 5e-05}], "success": true, "duration": 5e-05}, | ||
{"name": "check invalid namespaces", "qualifiedName": "vibedav.prop.__unittestL759_23", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 3.4e-05}, {"name": "gcUsedSize", "value": 3248, "timestamp": 3.4e-05}, {"name": "gcFreeListSize", "value": 848, "timestamp": 3.4e-05}], "success": true, "duration": 3.4e-05}, | ||
{"name": "check valid namespaces", "qualifiedName": "vibedav.prop.__unittestL771_24", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 3.2e-05}, {"name": "gcUsedSize", "value": 2192, "timestamp": 3.2e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 3.2e-05}], "success": true, "duration": 3.2e-05}, | ||
{"name": "parse xml attribute", "qualifiedName": "vibedav.prop.__unittestL778_25", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 2.4e-05}, {"name": "gcUsedSize", "value": 912, "timestamp": 2.4e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 2.4e-05}], "success": true, "duration": 2.4e-05}, | ||
{"name": "normalize xml string", "qualifiedName": "vibedav.prop.__unittestL784_26", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 1.6e-05}, {"name": "gcUsedSize", "value": 64, "timestamp": 1.6e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 1.6e-05}], "success": true, "duration": 1.6e-05}, | ||
{"name": "normalize `/` and `<` in attr values", "qualifiedName": "vibedav.prop.__unittestL790_27", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 1.4e-05}, {"name": "gcUsedSize", "value": 64, "timestamp": 1.4e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 1.4e-05}], "success": true, "duration": 1.4e-05}, | ||
{"name": "access nodes without passing the ns", "qualifiedName": "vibedav.prop.__unittestL796_28", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 4.5e-05}, {"name": "gcUsedSize", "value": 1872, "timestamp": 4.5e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 4.5e-05}], "success": true, "duration": 4.5e-05}, | ||
{"name": "parse self closing tags", "qualifiedName": "vibedav.prop.__unittestL803_29", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 3.8e-05}, {"name": "gcUsedSize", "value": 576, "timestamp": 3.8e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 3.8e-05}], "success": true, "duration": 3.8e-05}, | ||
{"name": "check ?xml tag parsing", "qualifiedName": "vibedav.prop.__unittestL809_30", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 5.1e-05}, {"name": "gcUsedSize", "value": 3248, "timestamp": 5.1e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 5.1e-05}], "success": true, "duration": 5.1e-05}, | ||
{"name": "check if the parsing fails to check the parents", "qualifiedName": "vibedav.prop.__unittestL815_31", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 4.3e-05}, {"name": "gcUsedSize", "value": 2384, "timestamp": 4.3e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 4.3e-05}], "success": true, "duration": 4.3e-05}, | ||
{"name": "check child names with similar name", "qualifiedName": "vibedav.prop.__unittestL821_32", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 4.8e-05}, {"name": "gcUsedSize", "value": 1344, "timestamp": 4.8e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 4.8e-05}], "success": true, "duration": 4.8e-05}, | ||
{"name": "allow to have childrens with the same tag name", "qualifiedName": "vibedav.prop.__unittestL827_33", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 4.2e-05}, {"name": "gcUsedSize", "value": 2656, "timestamp": 4.2e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 4.2e-05}], "success": true, "duration": 4.2e-05}, | ||
{"name": "value given for tag with null ns", "qualifiedName": "vibedav.prop.__unittestL833_34", "instrumentation": [{"name": "gcPoolSize", "value": 0, "timestamp": 6.1e-05}, {"name": "gcUsedSize", "value": 2544, "timestamp": 6.1e-05}, {"name": "gcFreeListSize", "value": 1.84467e+19, "timestamp": 6.1e-05}], "success": true, "duration": 6.1e-05} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import std.typetuple; | ||
|
||
import vibedav.base; | ||
import vibedav.file; | ||
import vibedav.prop; | ||
import vibedav.util; | ||
alias allModules = TypeTuple!(vibedav.base, vibedav.file, vibedav.prop, vibedav.util); | ||
|
||
import std.stdio; | ||
import core.runtime; | ||
|
||
shared bool result; | ||
|
||
int main() { | ||
|
||
if(!result) { | ||
return 1; | ||
} | ||
|
||
writeln("All unit tests have been run successfully."); | ||
|
||
return 0; | ||
} | ||
shared static this() { | ||
version (Have_tested) { | ||
import tested; | ||
import core.runtime; | ||
import std.exception; | ||
Runtime.moduleUnitTester = () => true; | ||
|
||
//runUnitTests!app(new JsonTestResultWriter("results.json")); | ||
|
||
//enforce(runUnitTests!allModules(new ConsoleTestResultWriter), "Unit tests failed."); | ||
result = runUnitTests!allModules(new JsonTestResultWriter("results.json")); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.