feat: Add proper handling in testcase runner and add testing json file
This commit is contained in:
parent
c3ea652c87
commit
bad946e9ac
2 changed files with 36 additions and 1 deletions
|
|
@ -121,7 +121,13 @@ pub fn task_deploy(testcase: &Testcase) -> Result<Value> {
|
|||
Ok(json)
|
||||
}
|
||||
"gfpoly_sort" => {
|
||||
let result = gfpoly_sort(args)?;
|
||||
let sorted_array = gfpoly_sort(args)?;
|
||||
let mut result: Vec<Vec<String>> = vec![];
|
||||
|
||||
for poly in sorted_array {
|
||||
result.push(poly.to_c_array());
|
||||
}
|
||||
|
||||
let json = json!({"sorted_polys" : json!(result)});
|
||||
|
||||
Ok(json)
|
||||
|
|
|
|||
29
test_json/poly_algs.json
Normal file
29
test_json/poly_algs.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"testcases": {
|
||||
"b856d760-023d-4b00-bad2-15d2b6da22fe": {
|
||||
|
||||
"action": "gfpoly_sort",
|
||||
"arguments": {
|
||||
"polys": [
|
||||
[
|
||||
"NeverGonnaGiveYouUpAAA==",
|
||||
"NeverGonnaLetYouDownAA==",
|
||||
"NeverGonnaRunAroundAAA==",
|
||||
"AndDesertYouAAAAAAAAAA=="
|
||||
],
|
||||
[
|
||||
"WereNoStrangersToLoveA==",
|
||||
"YouKnowTheRulesAAAAAAA==",
|
||||
"AndSoDoIAAAAAAAAAAAAAA=="
|
||||
],
|
||||
[
|
||||
"NeverGonnaMakeYouCryAA==",
|
||||
"NeverGonnaSayGoodbyeAA==",
|
||||
"NeverGonnaTellALieAAAA==",
|
||||
"AndHurtYouAAAAAAAAAAAA=="
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue