package sexpr import ( “testing” ) func TestEvalInvalid(t *testing.T) { for idx, test := range []string{ “x”, “(1)”, “(LENGTH ‘(1 . 2))”, “(QUOTE)”, “(QUOTE 1…
; A list is a 1-D array of numbers. ; A matrix is a 2-D array of numbers, stored in row-major order. ; If needed,…
;;;;;;;;;;;;;;;;;;;;;;;; ;;; pre-testing prep ;;; ;;;;;;;;;;;;;;;;;;;;;;;; (load “../lisp-unit.lisp”) (use-package :lisp-unit) (load “nfa.lisp”) (remove-tests :all) (setq *print-failures* t) (defun fooTransitions (state input) ;; * 0 -a->…
package sexpr import ( “testing” ) // Simple tests for tokenizing strings with a single token. func TestLexerValidTokens(t *testing.T) { tests := []struct { input…
;;;;;;;;;;;;;;;;;;;;;;;; ;;; pre-testing prep ;;; ;;;;;;;;;;;;;;;;;;;;;;;; (load “../lisp-unit.lisp”) (use-package :lisp-unit) (load “match.lisp”) (remove-tests :all) (setq *print-failures* t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; match test definitions ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-test…
AAers/vagrant/work/received-2019/to-be-uploaded/2021-
package sexpr import ( “math/big” “testing” ) func TestSExprNil(t *testing.T) { se := mkNil() if !se.isNil() { t.Errorf(“expected isNil() to return true”) } if !se.isAtom()…
;;;;;;;;;;;;;;;;;;;;;;;; ;;; pre-testing prep ;;; ;;;;;;;;;;;;;;;;;;;;;;;; (load “../lisp-unit.lisp”) (use-package :lisp-unit) (load “matrix.lisp”) (remove-tests :all) (setq *print-failures* t) ;;;;;;;;;;;;;;;;;;;;;;;; ;;; test definitions ;;; ;;;;;;;;;;;;;;;;;;;;;;;; (define-test test-are-adjacent…
package sexpr import ( “errors” //”math/big” // You will need to use this package in your implementation. ) // ErrEval is the error value returned…
package sexpr import ( “math/big” “testing” ) func buildNilExample() *SExpr { return mkNil() } func buildNumberExample() *SExpr { return mkNumber(big.NewInt(100)) } func buildSymbolExample() *SExpr {…