Skip to content

Commit

Permalink
Removed tested dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Szabo Bogdan committed Sep 24, 2016
1 parent 2b73603 commit 6c6652b
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 64 deletions.
3 changes: 1 addition & 2 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"authors": ["Szabo Bogdan"],
"license": "MIT",
"dependencies": {
"vibe-d": "~>0.7.30-beta.1",
"tested": "~>0.9.4"
"vibe-d": "~>0.7.30-beta.1"
},

"targetType": "library"
Expand Down
3 changes: 1 addition & 2 deletions source/vibedav/base.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import std.stdio;
import std.typecons;
import std.uri;
import std.algorithm.sorting, std.algorithm.setops;
import tested;

class DavStorage {
static {
Expand Down Expand Up @@ -96,7 +95,7 @@ Path getFilePath(Path baseUrlPath, Path basePath, URL url) {
return basePath ~ filePath;
}

@name("Basic getFilePath")
@("Basic getFilePath")
unittest {
auto path = getFilePath(Path("test/"), Path("/base/"), URL("http://127.0.0.1/test/file.txt"));
assert(path.toString == "/base/file.txt");
Expand Down
10 changes: 4 additions & 6 deletions source/vibedav/http.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import vibe.core.file;
import vibe.stream.operations;
import vibe.utils.dictionarylist;

import tested;

debug {
import std.stdio;
}
Expand All @@ -38,22 +36,22 @@ string getHeaderValue(HeaderList headers, string name, string defaultValue = "")
return value;
}

@name("basic check for getHeaderValue")
@("basic check for getHeaderValue")
unittest {
HeaderList list;
list["key"] = "value";
auto val = getHeaderValue(list, "key");
assert(val == "value");
}

@name("getHeaderValue with default value")
@("getHeaderValue with default value")
unittest {
HeaderList list;
auto val = getHeaderValue(list, "key", "default");
assert(val == "default");
}

@name("check if getHeaderValue fails")
@("check if getHeaderValue fails")
unittest {
bool raised = false;

Expand Down Expand Up @@ -154,7 +152,7 @@ struct DavResponse {
}
}

@name("Test opIndex")
@("Test opIndex")
unittest {
DavResponse davResponse = DavResponse.Create;
davResponse["test"] = "value";
Expand Down
11 changes: 5 additions & 6 deletions source/vibedav/icalendar.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
module vibedav.icalendar;

import tested;
import std.string;
import std.stdio;

Expand Down Expand Up @@ -134,7 +133,7 @@ struct vEvent
}
}

@name("Set unique property")
@("Set unique property")
unittest
{
vEvent event;
Expand All @@ -144,7 +143,7 @@ unittest
assert(event.toString == "BEGIN:VEVENT\nCLASS:value\nEND:VEVENT");
}

@name("Set unique property twice throw Exception")
@("Set unique property twice throw Exception")
unittest
{
vEvent event;
Expand All @@ -165,7 +164,7 @@ unittest
assert(event.toString == "BEGIN:VEVENT\nCLASS:value1\nEND:VEVENT");
}

@name("Set optional properties")
@("Set optional properties")
unittest
{
vEvent event;
Expand Down Expand Up @@ -371,7 +370,7 @@ iCalendar parseICalendar(string data)
return calendar;
}

@name("Parse VEVENT")
@("Parse VEVENT")
unittest
{

Expand All @@ -397,7 +396,7 @@ END:VCALENDAR";
assert(parsed.vEvents[0]["DTSTART"] == "20150401T000000Z");
}

@name("Parse VEVENT with timezone")
@("Parse VEVENT with timezone")
unittest
{

Expand Down
12 changes: 5 additions & 7 deletions source/vibedav/ifheader.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
*/
module vibedav.ifheader;

import tested;

import vibedav.parser;

import std.stdio;
Expand Down Expand Up @@ -166,15 +164,15 @@ struct IfHeader {
}
}

@name("No-Tag-List")
@("No-Tag-List")
unittest {
auto tag = IfHeader.parse("(<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)");

assert(tag.list.keys.length == 1);
assert(tag.has("", "urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf"));
}

@name("Tagged-List")
@("Tagged-List")
unittest {
auto tag = IfHeader.parse("<http://example.com/locked/> (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>) (<other>)");

Expand All @@ -183,15 +181,15 @@ unittest {
assert(tag.has("http://example.com/locked/", "other"));
}

@name("Tagged-List")
@("Tagged-List")
unittest {
auto tag = IfHeader.parse("<http://example.com/locked/> (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)");

assert(tag.list.keys.length == 1);
assert(tag.has("http://example.com/locked/", "urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf"));
}

@name("multiple conditions")
@("multiple conditions")
unittest {
auto tag = IfHeader.parse("(<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>) (Not <DAV:no-lock>)");

Expand All @@ -202,7 +200,7 @@ unittest {
assert(!tag.hasNot("", "urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2"));
}

@name("etag conditions")
@("etag conditions")
unittest {
auto tag = IfHeader.parse(`(<DAV:no-lock> ["C8E30A4F4684AB4A5053F6C1ACBA1023"])`);

Expand Down
2 changes: 0 additions & 2 deletions source/vibedav/plugins/caldav.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import std.typecons;
import std.uri;
import std.uuid;

import tested;

private bool matchPluginUrl(Path path, string username) {
if(path.length < 2) {
return false;
Expand Down
2 changes: 0 additions & 2 deletions source/vibedav/plugins/filedav.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ static if (__traits(compiles, { import std.algorithm.comparison : max; }))
else
import std.algorithm;

import tested: testName = name;

/// Compute a file etag
string eTag(string path) {
import std.digest.crc;
Expand Down
Loading

0 comments on commit 6c6652b

Please sign in to comment.