Skip to content

Commit 47f3bdd

Browse files
committed
add new tests for CPM
1 parent 54f5bb3 commit 47f3bdd

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ Manifest.toml
2727
# test.jl file is created for development purposes only
2828
test.jl
2929

30+
.vscode/
31+

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### 0.2.5 (Upcoming Release)
22

3+
- Add new tests for CPM
4+
35

46
### 0.2.4
57

test/testcpm.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
@testset "CPM" verbose = true begin
22

3+
@testset "Mini CPM Problem" begin
4+
A = CpmActivity("A", 5)
5+
B = CpmActivity("B", 10)
6+
C = CpmActivity("C", 8, [A, B])
7+
8+
problem = CpmProblem([A, B, C])
9+
10+
result = solve(problem)
11+
12+
@test result isa CpmResult
13+
@test result.pathstr == ["B", "C"]
14+
@test result.path == [B, C]
15+
@test earliestfinishtime(A) == 5
16+
@test earliestfinishtime(B) == 10
17+
@test earliestfinishtime(C) == 18
18+
end
19+
320
@testset "earliest finishing times of activities" begin
421
A = CpmActivity("A", 3)
522
B = CpmActivity("B", 2)

0 commit comments

Comments
 (0)