init commit again
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-initialised-variable(booleans,true),
|
||||
check-true(assigned(given)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
not is-equal(allocate-variable(values), allocate-variable(values))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-initialised-variable(booleans,false),
|
||||
sequential(
|
||||
assign(given,true),
|
||||
else(assign(given,42), print"OK")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-initialised-variable(booleans,true),
|
||||
sequential(
|
||||
check-true assigned(given),
|
||||
store-clear,
|
||||
else(assigned(given), print"OK")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
{ "a" |-> allocate-initialised-variable(booleans,false),
|
||||
"b" |-> 42,
|
||||
"c" |-> allocate-initialised-variable(booleans,true),
|
||||
"d" |-> 13 },
|
||||
sequential(
|
||||
check-true is-equal(
|
||||
current-value(map()),
|
||||
map()),
|
||||
check-true is-equal(
|
||||
current-value(given),
|
||||
{"a"|->variable(atom("@1"), booleans),"b"|->42
|
||||
,"c"|->variable(atom("@2"), booleans),"d"|->13}),
|
||||
check-true is-equal(
|
||||
current-value(lookup(given,"a")),false),
|
||||
check-true is-equal(
|
||||
current-value(lookup(given,"c")),true),
|
||||
check-true is-equal(
|
||||
current-value{42},
|
||||
{42})))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
sequential(
|
||||
check-true is-equal(
|
||||
current-value(allocate-initialised-variable(integers,42)),
|
||||
42),
|
||||
check-true is-equal(current-value(42), 42))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing(print"OK")
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
give(
|
||||
allocate-variable(booleans),
|
||||
sequential(initialise-variable(given,true),given)),
|
||||
else(initialise-variable(given,true), print"OK"))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
is-in-type(fresh-atom, locations)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-variable(booleans),
|
||||
recycle-variables(given))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
store: map();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-variable(booleans),
|
||||
recycle-variables(given,allocate-variable(booleans)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
store: map();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-variable(booleans),
|
||||
sequential(
|
||||
recycle-variables(given),
|
||||
else(recycle-variables(given), print"OK")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
sequential(
|
||||
effect allocate-variable(booleans),
|
||||
store-clear)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
store: map();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(fresh-atom,
|
||||
and(
|
||||
is-in-type(map(),stores),
|
||||
is-in-type({given|->true},stores),
|
||||
is-in-type({given|->true, fresh-atom|->()},stores)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-initialised-variable(booleans,false),
|
||||
sequential(
|
||||
structural-assign(given,true),
|
||||
else(structural-assign(given,42), print"OK")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
tuple(
|
||||
allocate-initialised-variable(booleans,false),
|
||||
42,
|
||||
allocate-initialised-variable(booleans,true)),
|
||||
sequential(
|
||||
structural-assign(given,tuple(true,42,false)),
|
||||
else(
|
||||
structural-assign(given,[true,42,false]),
|
||||
structural-assign(given,tuple(true,99,false)),
|
||||
structural-assign(given,false),
|
||||
print"OK")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
{ "a" |-> allocate-initialised-variable(booleans,false),
|
||||
"b" |-> 42,
|
||||
"c" |-> allocate-initialised-variable(booleans,true) },
|
||||
sequential(
|
||||
structural-assign(map(),map()),
|
||||
structural-assign(given,{"a"|->true,"b"|->42,"c"|->false}),
|
||||
structural-assign(true,true),
|
||||
else(
|
||||
structural-assign(given,{"a"|->true,"b"|->99,"c"|->false}),
|
||||
structural-assign(given,{"a"|->true,"c"|->false}),
|
||||
structural-assign(given,map()),
|
||||
structural-assign(given,{"a"|->true,"b"|->42,"c"|->false,"d"|->()}),
|
||||
structural-assign(true,false),
|
||||
print"OK")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-initialised-variable(booleans,true),
|
||||
check-true structural-assigned(given))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
tuple(
|
||||
allocate-initialised-variable(booleans,false),
|
||||
42,
|
||||
allocate-initialised-variable(booleans,true)),
|
||||
check-true is-equal(
|
||||
structural-assigned(given),
|
||||
tuple(false,42,true)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
{ "a" |-> allocate-initialised-variable(booleans,true),
|
||||
"b" |-> 42,
|
||||
"c" |-> allocate-initialised-variable(booleans,false) },
|
||||
sequential(
|
||||
check-true is-equal(
|
||||
structural-assigned(map()),
|
||||
map()),
|
||||
check-true is-equal(
|
||||
structural-assigned(given),
|
||||
{"a"|->true,"b"|->42,"c"|->false}),
|
||||
check-true is-equal(
|
||||
structural-assigned{42},
|
||||
{42})))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
{ "a" |-> allocate-initialised-variable(booleans,false),
|
||||
"b" |-> 42,
|
||||
"c" |-> allocate-initialised-variable(booleans,true),
|
||||
"d" |-> 13 },
|
||||
sequential(
|
||||
check-true is-equal(
|
||||
structural-assigned(map()),
|
||||
map()),
|
||||
check-true is-equal(
|
||||
structural-assigned(given),
|
||||
{"a"|->false,"b"|->42,"c"|->true,"d"|->13}),
|
||||
check-true is-equal(
|
||||
structural-assigned{42},
|
||||
{42})))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-storing
|
||||
give(
|
||||
allocate-initialised-variable(booleans,true),
|
||||
sequential(
|
||||
check-true assigned(given),
|
||||
un-assign(given),
|
||||
else(
|
||||
assigned(given),
|
||||
print"OK")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
Reference in New Issue
Block a user