Skip to content

Commit

Permalink
Add @safe and @System to std.csv unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atilaneves committed Jun 29, 2016
1 parent cba5d10 commit 54645f0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions std/csv.d
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ auto csvReader(Contents = string,
}

// Test struct & header interface and same unicode
unittest
@safe unittest
{
import std.math : abs;

Expand Down Expand Up @@ -587,7 +587,7 @@ unittest
}

// Test header interface
unittest
@safe unittest
{
import std.algorithm;

Expand Down Expand Up @@ -633,7 +633,7 @@ unittest
}

// Test null header interface
unittest
@safe unittest
{
string str = "a,b,c\nHello,65,63.63\nWorld,123,3673.562";
auto records = csvReader(str, ["a"]);
Expand Down Expand Up @@ -699,7 +699,7 @@ unittest


// Test associative array support with unicode separator
unittest
@safe unittest
{
string str = "1❁2❁3\n34❁65❁63\n34❁65❁63";

Expand All @@ -715,7 +715,7 @@ unittest
}

// Test restricted range
unittest
@safe unittest
{
import std.typecons;
struct InputRange
Expand Down Expand Up @@ -753,7 +753,7 @@ unittest
(ir,cast(string[])null)) {}
}

unittest // const/immutable dchars
@safe unittest // const/immutable dchars
{
import std.algorithm : map;
import std.array : array;
Expand Down Expand Up @@ -1115,7 +1115,8 @@ public:
}

// Bugzilla 15545
pure unittest
// @system due to the catch for Throwable
@system pure unittest
{
enum failData =
"name, surname, age
Expand Down Expand Up @@ -1465,7 +1466,7 @@ void csvNextToken(Range, Malformed ErrorLevel = Malformed.throwException,
}

///
unittest
@safe unittest
{
import std.array : appender;
string str = "65,63\n123,3673";
Expand Down

0 comments on commit 54645f0

Please sign in to comment.