home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
lifeos2.zip
/
LIFE-1.02
/
TESTS
/
IN
/
LIBSTRUC.IN
< prev
next >
Wrap
Text File
|
1996-06-04
|
4KB
|
117 lines
toto <| tata.
test(tata +>= toto) ? %% simple matching
test(toto +>= tata) ?
test((A,B) +>= (C,C)) ? %% coreference
test((C,C) +>= (A,B)) ?
test([A|B] +>= [C,C]) ? %% lists
test([C|C] +>= [A|B]) ?
test(foo(a,s,d) +>= foo(a,s,d,@)) ? %% features
test(foo(a,s,d,@) +>= foo(a,s,d)) ?
nl ?
test(tata +> toto) ? %% simple matching
test(toto +> tata) ?
test((A,B) +> (C,C)) ? %% coreference
test((C,C) +> (A,B)) ?
test([A|B] +> [C|C]) ? %% lists
test([C|C] +> [A|B]) ?
test(foo(a,s,d) +> foo(a,s,d,@)) ? %% features
test(foo(a,s,d,@) +> foo(a,s,d)) ?
nl ?
test(tata == toto) ? %% simple matching
test(toto == tata) ?
test((A,B) == (C,C)) ? %% coreference
test((C,C) == (A,B)) ?
test([A|B] == [C,C]) ? %% lists
test([C|C] == [A|B]) ?
test(foo(a,s,d) == foo(a,s,d,@)) ? %% features
test(foo(a,s,d,@) == foo(a,s,d)) ?
X = big(tom(hair => knotted,
hands => clumsy,
brain => slow_witted,
favorite_exclamation => 'arghh!!',
friend => {john(face => spotty,
teeth => yellow);
jeremy(skin => black_and_blue,
known_letters => [a,b,c,y,t,w,i,o],
brain => hurts);
martha(brain => plank(number => 2,
length => short),
beauty => gorgon_like)},
nose => long(warts => red,
spots => ugly),
mother => witch,
father => tax_collector)),
Y = copy_term(X),
nl, test(X == Y) ?
test(tata +=< toto) ? %% simple matching
test(toto +=< tata) ?
test((A,B) +=< (C,C)) ? %% coreference
test((C,C) +=< (A,B)) ?
test([A|B] +=< [C,C]) ? %% lists
test([C|C] +=< [A|B]) ?
test(foo(a,s,d) +=< foo(a,s,d,@)) ? %% features
test(foo(a,s,d,@) +=< foo(a,s,d)) ?
nl ?
test(tata +< toto) ? %% simple matching
test(toto +< tata) ?
test((A,B) +< (C,C)) ? %% coreference
test((C,C) +< (A,B)) ?
test([A|B] +< [C,C]) ? %% lists
test([C|C] +< [A|B]) ?
test(foo(a,s,d) +< foo(a,s,d,@)) ? %% features
test(foo(a,s,d,@) +< foo(a,s,d)) ?
nl ?
test(tata +>< toto) ? %% simple matching
test(toto +>< tata) ?
test((A,B) +>< (C,C)) ? %% coreference
test((C,C) +>< (A,B)) ?
test([A|B] +>< [C,C]) ? %% lists
test([C|C] +>< [A|B]) ?
test(foo(a,s,d) +>< foo(a,s,d,@)) ? %% features
test(foo(a,s,d,@) +>< foo(a,s,d)) ?
X = big(tom(hair => knotted,
hands => clumsy,
brain => slow_witted,
favorite_exclamation => 'arghh!!',
friend => {john(face => spotty,
teeth => yellow);
jeremy(skin => black_and_blue,
known_letters => [a,b,c,y,t,w,i,o],
brain => hurts);
martha(brain => plank(number => 2,
length => short),
beauty => gorgon_like)},
nose => long(warts => red,
spots => ugly),
mother => witch,
father => tax_collector)),
Y = copy_term(X),
nl, test(X \== Y) ?
test(write(charley))?
X={a;b},Y={c;a;b;d},test(X:==Y)?
ab <| a.
ab <| b.
ac <| a.
ac <| c.
bc <| a.
bc <| c.
test( f(b,c) +>< f(X,X) ) ?