Commit 215ebb19 authored by Steffen Michels's avatar Steffen Michels

add option to output test start/end events in JSON format

parent 3f78bbc6
......@@ -13,6 +13,7 @@ definition module Gast.StdProperty
import Gast.GenLibTest
import Gast.Testable
from StdString import instance toString {#Char}
class (\/) infixr 2 a b :: !a b -> Property // Conditional or of arg1 and arg2
class (/\) infixr 3 a b :: !a b -> Property // Conditional and of arg1 and arg2
......@@ -48,7 +49,7 @@ ForEach :: ![x] !(x->p) -> Property | Testable p & TestArg x
classify :: !Bool l !p -> Property | Testable p & genShow{|*|} l
label :: !l !p -> Property | Testable p & genShow{|*|} l
name :: !n !p -> Property | Testable p & genShow{|*|} n
name :: !n !p -> Property | Testable p & toString n
instance ~ Bool
instance ~ Property
......@@ -188,8 +188,8 @@ classify c l p
label :: !l !p -> Property | Testable p & genShow{|*|} l
label l p = Prop (\rs r = evaluate p rs {r & labels = [show1 l:r.labels]})
name :: !n !p -> Property | Testable p & genShow{|*|} n
name n p = Prop (\rs r = evaluate p rs {r & name = [show1 n:r.name]})
name :: !n !p -> Property | Testable p & toString n
name n p = Prop (\rs r = evaluate p rs {r & name = [toString n:r.name]})
instance ~ Bool where ~ b = not b
......
......@@ -17,7 +17,7 @@ import Gast.Gen
//--- basics --//
:: Admin = {labels::![String], args::![String], name::![String], res::Result, mes::[String]}
:: Admin = {labels::![String], args::![String], name::![String], res::!Result, mes::![String]}
:: Result = Undef | Rej | Pass | OK | CE
newAdmin :: Admin
......@@ -70,18 +70,21 @@ generateAll :: !GenState -> [a] | ggen{|*|} a //& genType{|*|} a
| Trace
| Concise
| Quiet
| OutputTestEvents //* output test results as event specified in clean-platform {{Testing.TestEvents}}
| ArgTypes [GenType]
Test :: [Testoption] !p -> [String] | Testable p
TestList :: [Testoption] ![p] -> [String] | Testable p
verbose :: !RandomStream !p -> [String] | Testable p
verbosen :: !Int !RandomStream !p -> [String] | Testable p
concise :: !RandomStream !p -> [String] | Testable p
concisen :: !Int !RandomStream !p -> [String] | Testable p
quiet :: !RandomStream !p -> [String] | Testable p
quietn :: !Int !RandomStream !p -> [String] | Testable p
quietnm :: !Int !Int !RandomStream !p -> [String] | Testable p
verbose :: !RandomStream !p -> [String] | Testable p
verbosen :: !Int !RandomStream !p -> [String] | Testable p
concise :: !RandomStream !p -> [String] | Testable p
concisen :: !Int !RandomStream !p -> [String] | Testable p
quiet :: !RandomStream !p -> [String] | Testable p
quietn :: !Int !RandomStream !p -> [String] | Testable p
quietnm :: !Int !Int !RandomStream !p -> [String] | Testable p
testEvents :: !RandomStream !p -> [String] | Testable p
testEventsn :: !Int !RandomStream !p -> [String] | Testable p
test :: !p -> [String] | Testable p // test p NrOfTest times
testn :: !Int !p -> [String] | Testable p // maxnumber of tests
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment