-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UnitTests moved to .dnp files.. @adferguson should review carefully.
- Loading branch information
Arjun Guha
committed
Dec 15, 2011
1 parent
ba8ba42
commit a8fdcec
Showing
30 changed files
with
151 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
for file in tests/*.dnp | ||
do | ||
echo -en "\rTest $file ... " | ||
./dnp -f $file | ||
tput el1 | ||
done | ||
|
||
|
||
|
||
echo "Testing complete." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
True <- root : AddUser arjun. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
False <- root : reserve(*) = 300 on net0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : reserve(*) = 300 on rootShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : reserve(*) = 100 on net0. | ||
True <- root : reserve(*) = 100 on net0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : reserve(*) = 100 on net0. | ||
True <- root : reserve(*) = 100 on net0. | ||
False <- root : reserve(*) = 100 on net0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : AddUser adf. | ||
True <- root : NewShare adfShare for (*) [reserve <= 150] on net0. | ||
True <- root : Grant adfShare to adf. | ||
True <- adf : reserve(*) = 100 on adfShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : AddUser adf. | ||
True <- root : NewShare adfShare for (*) [reserve <= 150] on net0. | ||
True <- root : Grant adfShare to adf. | ||
True <- adf : reserve(*) = 100 on adfShare. | ||
True <- root : reserve(*) = 100 on net0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : AddUser adf. | ||
True <- root : NewShare adfShare for (*) [reserve <= 150] on net0. | ||
True <- root : Grant adfShare to adf. | ||
True <- adf : reserve(*) = 100 on adfShare. | ||
True <- root : reserve(*) = 50 on adfShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : AddUser adf. | ||
True <- root : NewShare adfShare for (*) [reserve <= 150] on net0. | ||
True <- root : Grant adfShare to adf. | ||
True <- adf : reserve(*) = 100 on adfShare. | ||
False <- root : reserve(*) = 51 on adfShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : AddUser adf. | ||
True <- root : NewShare adfShare for (*) [reserve <= 150] on net0. | ||
True <- root : Grant adfShare to adf. | ||
True <- adf : reserve(*) = 100 on adfShare. | ||
False <- root : reserve(*) = 101 on net0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
True <- root : NewShare net0 for (*) [reserve <= 200] on rootShare. | ||
True <- root : AddUser adf. | ||
True <- root : NewShare adfShare for (*) [reserve <= 150] on net0. | ||
True <- root : Grant adfShare to adf. | ||
True <- adf : reserve(*) = 100 on adfShare. | ||
False <- adf : reserve(*) = 51 on adfShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
True <- root : AddUser arjun. | ||
True <- root : NewShare hadoopShare for (*) [reserve<=100] on rootShare. | ||
True <- root : GrantDefault hadoopShare. | ||
True <- arjun : reserve(*) = 25 on hadoopShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
False <- root : AddUser root. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
True <- root : AddUser arjun. | ||
True <- root : NewShare hadoopShare for (*) [reserve<=100] on rootShare. | ||
True <- root : GrantDefault hadoopShare. | ||
True <- arjun : reserve(*) = 25 on hadoopShare. | ||
True <- root : AddUser adf. | ||
True <- adf : reserve(*) = 25 on hadoopShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
True <- root : AddUser arjun. | ||
True <- root : NewShare arjunShare for (user=arjun) [reserve <= 100] on rootShare. | ||
True <- root : Grant arjunShare to arjun. | ||
True <- arjun : reserve (user=arjun) = 50 on arjunShare. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
True <- root : AddUser arjun. | ||
True <- root : NewShare arjunShare for (user=arjun) [reserve <= 100] on rootShare. | ||
True <- root : Grant arjunShare to arjun. | ||
True <- arjun : reserve (user=arjun) = 50 on arjunShare. | ||
True <- arjun : reserve(user=arjun,app=80) = 50 on arjunShare. | ||
/* TODO: the in-Haskell test checked that | ||
|
||
Set.fromList s == Set.fromList [ | ||
(foreverReq "arjun-share" arjunFlow (ReqResv 50)), | ||
(foreverReq "arjun-share" arjunWebFlow (ReqResv 50))] | ||
|
||
We can do this (or something similar) once we return the free/busy schedule. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
True <- root : AddUser arjun. | ||
True <- root : NewShare arjunShare for (user=arjun) [reserve <= 100] on rootShare. | ||
True <- root : Grant arjunShare to arjun. | ||
True <- arjun : reserve (user=arjun) = 50 on arjunShare. | ||
False <- arjun : reserve (*) = 50 on arjunShare. |
Oops, something went wrong.
a8fdcec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good Ajrun! The original test case for 21 had the same reservations check as 22 has, so I'll commit the same TODO message.