add != to honu. start making some tests
svn: r13372
This commit is contained in:
parent
e092884415
commit
6ebd445726
|
@ -1396,6 +1396,10 @@
|
|||
(syntax-case stx ()
|
||||
[(_ a b) #'(and a b)]))
|
||||
|
||||
(define-syntax (!= stx)
|
||||
(syntax-case stx ()
|
||||
[(_ a b) #'(not (equal? a b))]))
|
||||
|
||||
(define-syntax (\|\| stx)
|
||||
(syntax-case stx ()
|
||||
[(_ a b) #'(or a b)]))
|
||||
|
@ -2064,7 +2068,7 @@
|
|||
(rename honu-class class)
|
||||
(rename honu+ +) (rename honu- -) (rename honu* *)
|
||||
/ (rename modulo %)
|
||||
< > <= >= (rename equal? ==)
|
||||
< > <= >= (rename equal? ==) !=
|
||||
&& \|\|
|
||||
(rename string->number stringToNumber)
|
||||
(rename number->string numberToString)
|
||||
|
|
17
collects/tests/honu/basic.honu
Normal file
17
collects/tests/honu/basic.honu
Normal file
|
@ -0,0 +1,17 @@
|
|||
#lang honu
|
||||
|
||||
obj test(t, a, b){
|
||||
if (a != b){
|
||||
display(t);
|
||||
display(" failed!");
|
||||
newline();
|
||||
display("Got ");
|
||||
display(a);
|
||||
display(". Expected ");
|
||||
display(b);
|
||||
newline();
|
||||
}
|
||||
}
|
||||
|
||||
var x = 3;
|
||||
test("x = 3", x, 4);
|
|
@ -1,4 +1,4 @@
|
|||
#honu
|
||||
#lang honu
|
||||
|
||||
/*
|
||||
<a>a f(a x, a b) { return (obj)x; }
|
||||
|
|
Loading…
Reference in New Issue
Block a user