Skip to content

Commit

Permalink
unittest configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
atilaneves committed Jun 13, 2018
1 parent b6355ae commit e5367ac
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ caring
*.lib
*.exe
*.dylib
fearless-example
fearless-example
ut
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: d
sudo: false

matrix:
include:
- d: dmd-2.080.1
- d: dmd-2.079.1
- d: dmd-2.078.3
- d: ldc-1.9.0
- d: ldc-1.8.0
- d: ldc-1.7.0

script:
- dub test --build=unittest-cov --compiler=${DC}
- dub run -c example

after_success:
- bash <(curl -s https://codecov.io/bash)
16 changes: 14 additions & 2 deletions dub.sdl
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
name "fearless"
description "D version of Rust's std::sync::Mutex"
description "Safe concurrency for D"
authors "Atila Neves"
copyright "Copyright © 2018, Atila Neves"
license "boost"
dflags "-dip25" "-dip1000"


configuration "default" {
targetType "library"
excludedSourceFiles "source/example.d"
}


configuration "example" {
targetType "executable"
targetName "fearless-example"
sourceFiles "examples/example.d"
}


configuration "unittest" {
targetType "executable"
targetName "ut"
importPaths "tests"
sourcePaths "tests"
mainSourceFile "tests/ut_main.d"
dependency "unit-threaded" version="~>0.7.0"
}
6 changes: 6 additions & 0 deletions dub.selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"fileVersion": 1,
"versions": {
"unit-threaded": "0.7.46"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion source/fearless/sharing.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
D implementation of Rust's std::sync::Mutexmodule fearless.sharing;
D implementation of Rust's std::sync::Mutex
*/
module fearless.sharing;

Expand Down
7 changes: 7 additions & 0 deletions tests/ut_main.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import unit_threaded;

int main(string[] args) {
return args.runTests!(
"ut.exclusive",
);
}

0 comments on commit e5367ac

Please sign in to comment.