-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from ltpquang/master
Fix runsThreshold limit condition
- Loading branch information
Showing
5 changed files
with
143 additions
and
2 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 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 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,47 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
type Thresholdeq int | ||
|
||
const ( | ||
req1 Thresholdeq = 2 | ||
req2 Thresholdeq = 4 | ||
req3 Thresholdeq = 6 | ||
req4 Thresholdeq = 8 | ||
req5 Thresholdeq = 10 | ||
req6 Thresholdeq = 12 | ||
req7 Thresholdeq = 14 | ||
req8 Thresholdeq = 16 | ||
req9 Thresholdeq = 18 | ||
req10 Thresholdeq = 20 | ||
) | ||
|
||
func main() { | ||
ck(1, "Thresholdeq(1)") | ||
ck(req1, "req1") | ||
ck(3, "Thresholdeq(3)") | ||
ck(req2, "req2") | ||
ck(5, "Thresholdeq(5)") | ||
ck(req3, "req3") | ||
ck(7, "Thresholdeq(7)") | ||
ck(req4, "req4") | ||
ck(9, "Thresholdeq(9)") | ||
ck(req5, "req5") | ||
ck(11, "Thresholdeq(11)") | ||
ck(req6, "req6") | ||
ck(13, "Thresholdeq(13)") | ||
ck(req7, "req7") | ||
ck(15, "Thresholdeq(15)") | ||
ck(req8, "req8") | ||
ck(17, "Thresholdeq(17)") | ||
ck(req9, "req9") | ||
ck(19, "Thresholdeq(19)") | ||
ck(req10, "req10") | ||
} | ||
|
||
func ck(thresholdeq Thresholdeq, str string) { | ||
if fmt.Sprint(thresholdeq) != str { | ||
panic("thresholdeq.go: " + str) | ||
} | ||
} |
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,50 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
type Thresholdgt int | ||
|
||
const ( | ||
rgt1 Thresholdgt = 2 | ||
rgt2 Thresholdgt = 4 | ||
rgt3 Thresholdgt = 6 | ||
rgt4 Thresholdgt = 8 | ||
rgt5 Thresholdgt = 10 | ||
rgt6 Thresholdgt = 12 | ||
rgt7 Thresholdgt = 14 | ||
rgt8 Thresholdgt = 16 | ||
rgt9 Thresholdgt = 18 | ||
rgt10 Thresholdgt = 20 | ||
rgt11 Thresholdgt = 22 | ||
) | ||
|
||
func main() { | ||
ck(1, "Thresholdgt(1)") | ||
ck(rgt1, "rgt1") | ||
ck(3, "Thresholdgt(3)") | ||
ck(rgt2, "rgt2") | ||
ck(5, "Thresholdgt(5)") | ||
ck(rgt3, "rgt3") | ||
ck(7, "Thresholdgt(7)") | ||
ck(rgt4, "rgt4") | ||
ck(9, "Thresholdgt(9)") | ||
ck(rgt5, "rgt5") | ||
ck(11, "Thresholdgt(11)") | ||
ck(rgt6, "rgt6") | ||
ck(13, "Thresholdgt(13)") | ||
ck(rgt7, "rgt7") | ||
ck(15, "Thresholdgt(15)") | ||
ck(rgt8, "rgt8") | ||
ck(17, "Thresholdgt(17)") | ||
ck(rgt9, "rgt9") | ||
ck(19, "Thresholdgt(19)") | ||
ck(rgt10, "rgt10") | ||
ck(21, "Thresholdgt(21)") | ||
ck(rgt11, "rgt11") | ||
} | ||
|
||
func ck(thresholdgt Thresholdgt, str string) { | ||
if fmt.Sprint(thresholdgt) != str { | ||
panic("thresholdgt.go: " + str) | ||
} | ||
} |
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,44 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
type Thresholdlt int | ||
|
||
const ( | ||
rlt1 Thresholdlt = 2 | ||
rlt2 Thresholdlt = 4 | ||
rlt3 Thresholdlt = 6 | ||
rlt4 Thresholdlt = 8 | ||
rlt5 Thresholdlt = 10 | ||
rlt6 Thresholdlt = 12 | ||
rlt7 Thresholdlt = 14 | ||
rlt8 Thresholdlt = 16 | ||
rlt9 Thresholdlt = 18 | ||
) | ||
|
||
func main() { | ||
ck(1, "Thresholdlt(1)") | ||
ck(rlt1, "rlt1") | ||
ck(3, "Thresholdlt(3)") | ||
ck(rlt2, "rlt2") | ||
ck(5, "Thresholdlt(5)") | ||
ck(rlt3, "rlt3") | ||
ck(7, "Thresholdlt(7)") | ||
ck(rlt4, "rlt4") | ||
ck(9, "Thresholdlt(9)") | ||
ck(rlt5, "rlt5") | ||
ck(11, "Thresholdlt(11)") | ||
ck(rlt6, "rlt6") | ||
ck(13, "Thresholdlt(13)") | ||
ck(rlt7, "rlt7") | ||
ck(15, "Thresholdlt(15)") | ||
ck(rlt8, "rlt8") | ||
ck(17, "Thresholdlt(17)") | ||
ck(rlt9, "rlt9") | ||
} | ||
|
||
func ck(thresholdlt Thresholdlt, str string) { | ||
if fmt.Sprint(thresholdlt) != str { | ||
panic("thresholdlt.go: " + str) | ||
} | ||
} |