diff --git a/.gitignore b/.gitignore index 36d52c4..4d02ba9 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,5 @@ libtrial.a xunit/ trial_*.d trial-lifecycle -trial-runner \ No newline at end of file +trial-runner +trial-root \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 0276aa3..ce0edbc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,4 +35,5 @@ matrix: allow_failures: - d: dmd-beta - d: ldc-beta + script: ./travis-ci.sh diff --git a/lifecycle/trial/discovery/unit.d b/lifecycle/trial/discovery/unit.d index 7caeb25..cb728bf 100644 --- a/lifecycle/trial/discovery/unit.d +++ b/lifecycle/trial/discovery/unit.d @@ -252,14 +252,14 @@ class UnitTestDiscovery : ITestDiscovery { enum key = "__un" ~ "ittestL"; enum len = key.length; - long line; + size_t line; try { auto postFix = name[len..$]; auto idx = postFix.indexOf("_"); if(idx != -1) { - line = postFix[0..idx].to!long; + line = postFix[0..idx].to!size_t; } } catch(Exception e) { return SourceLocation(); diff --git a/lifecycle/trial/interfaces.d b/lifecycle/trial/interfaces.d index 991483f..81c6ff0 100644 --- a/lifecycle/trial/interfaces.d +++ b/lifecycle/trial/interfaces.d @@ -127,7 +127,10 @@ struct Attachment { import trial.runner; auto a = const Attachment(name, path, name); - LifeCycleListeners.instance.attach(a); + + if(LifeCycleListeners.instance !is null) { + LifeCycleListeners.instance.attach(a); + } } } diff --git a/travis-ci.sh b/travis-ci.sh index b9dd592..23135cd 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -3,7 +3,7 @@ set -e -x -o pipefail # test for successful 32-bit build if [ "$DC" == "dmd" ]; then - dub build :lifecycle --arch=x86 + dub test :lifecycle --arch=x86 dub clean --all-packages fi