Skip to content

Commit

Permalink
Merge pull request #36 from gedaiu/34-fix-32-bit-build
Browse files Browse the repository at this point in the history
34 fix 32 bit build
  • Loading branch information
gedaiu authored Sep 25, 2017
2 parents fd82ec8 + 2b069fb commit 70f1765
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ libtrial.a
xunit/
trial_*.d
trial-lifecycle
trial-runner
trial-runner
trial-root
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ matrix:
allow_failures:
- d: dmd-beta
- d: ldc-beta

script: ./travis-ci.sh
4 changes: 2 additions & 2 deletions lifecycle/trial/discovery/unit.d
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 4 additions & 1 deletion lifecycle/trial/interfaces.d
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 70f1765

Please sign in to comment.