diff --git a/collects/honu/main.ss b/collects/honu/main.ss index e3d65b245e..ea7f93f4a4 100644 --- a/collects/honu/main.ss +++ b/collects/honu/main.ss @@ -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) diff --git a/collects/tests/honu/basic.honu b/collects/tests/honu/basic.honu new file mode 100644 index 0000000000..e541fcf19c --- /dev/null +++ b/collects/tests/honu/basic.honu @@ -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); diff --git a/collects/tests/honu/ideas.honu b/collects/tests/honu/ideas.honu index 9105138c7e..c7d270a50c 100644 --- a/collects/tests/honu/ideas.honu +++ b/collects/tests/honu/ideas.honu @@ -1,4 +1,4 @@ -#honu +#lang honu /* a f(a x, a b) { return (obj)x; }