-
Notifications
You must be signed in to change notification settings - Fork 1
/
OperatorInterfacePeriodic_p_tcproc_operatorInterface_UnitTestConfiguration_Util.scala
94 lines (80 loc) · 3.77 KB
/
OperatorInterfacePeriodic_p_tcproc_operatorInterface_UnitTestConfiguration_Util.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// #Sireum
package tc.TempControlSoftwareSystem
// Do not edit this file as it will be overwritten if HAMR codegen is rerun
import org.sireum._
import tc.GumboXUtil.GumboXResult
import tc.util.{Container, Profile, UnitTestConfigurationBatch}
import tc.RandomLib
import org.sireum.Random.Impl.Xoshiro256
object OperatorInterfacePeriodic_p_tcproc_operatorInterface_UnitTestConfiguration_Util {
def freshRandomLib: RandomLib = {
return RandomLib(Random.Gen64Impl(Xoshiro256.create))
}
val tq: String = "\"\"\""
type DefaultInitializeProfile = OperatorInterfacePeriodic_p_tcproc_operatorInterface_Profile
def defaultInitializeConfig: OperatorInterfacePeriodic_p_tcproc_operatorInterface_Initialize_UnitTestConfiguration = {
return (OperatorInterfacePeriodic_p_tcproc_operatorInterface_Initialize_UnitTestConfiguration (
verbose = F,
name = "Default_Initialize_Config",
description = "Default Initialize Configuration",
numTests = 100,
numTestVectorGenRetries = 100,
failOnUnsatPreconditions = F,
profile = OperatorInterfacePeriodic_p_tcproc_operatorInterface_Profile (
name = "Initialize_Default_Profile",
),
genReplay = (c: Container, testName: String, r: GumboXResult.Type) => None())
)
}
type DefaultComputeProfile = OperatorInterfacePeriodic_p_tcproc_operatorInterface_Profile_P
def defaultComputeConfig: OperatorInterfacePeriodic_p_tcproc_operatorInterface_Compute_UnitTestConfiguration = {
return (OperatorInterfacePeriodic_p_tcproc_operatorInterface_Compute_UnitTestConfiguration (
verbose = F,
name = "Default_Compute_Config",
description = "Default Compute Configuration",
numTests = 100,
numTestVectorGenRetries = 100,
failOnUnsatPreconditions = F,
profile = OperatorInterfacePeriodic_p_tcproc_operatorInterface_Profile_P (
name = "Compute_Default_Profile",
api_currentTemp = freshRandomLib
),
genReplay = (c: Container, testName: String, r: GumboXResult.Type) => Some(
st"""Replay Unit Test:
| test("Replay: $testName") {
| val results = tc.GumboXUtil.GumboXResult.$r
| val json = st${tq}${tc.JSON.fromutilContainer(c, T)}${tq}.render
| val testVector = tc.JSON.toTempControlSoftwareSystemOperatorInterfacePeriodic_p_tcproc_operatorInterface_PreState_Container_P(json).left
| assert (testComputeCBV(testVector) == results)
| }""".render))
)
}
}
@record class OperatorInterfacePeriodic_p_tcproc_operatorInterface_Initialize_UnitTestConfiguration (
var verbose: B,
var name: String,
var description: String,
var numTests: Z,
var numTestVectorGenRetries: Z,
var failOnUnsatPreconditions: B,
var profile: OperatorInterfacePeriodic_p_tcproc_operatorInterface_Profile_Trait,
var genReplay: (Container, String, GumboXResult.Type) => Option[String])
extends UnitTestConfigurationBatch with OperatorInterfacePeriodic_p_tcproc_operatorInterface_GumboX_TestHarness {
override def test(c: Container): GumboXResult.Type = {
return testInitialiseCB()
}
}
@record class OperatorInterfacePeriodic_p_tcproc_operatorInterface_Compute_UnitTestConfiguration (
var verbose: B,
var name: String,
var description: String,
var numTests: Z,
var numTestVectorGenRetries: Z,
var failOnUnsatPreconditions: B,
var profile: OperatorInterfacePeriodic_p_tcproc_operatorInterface_Profile_P_Trait,
var genReplay: (Container, String, GumboXResult.Type) => Option[String])
extends UnitTestConfigurationBatch with OperatorInterfacePeriodic_p_tcproc_operatorInterface_GumboX_TestHarness {
override def test(c: Container): GumboXResult.Type = {
return testComputeCBV(c.asInstanceOf[OperatorInterfacePeriodic_p_tcproc_operatorInterface_PreState_Container])
}
}