- (list
- ,name
- (lambda ()
- (cl-nl:boot)
- (cl-nl:run-commands ,commands)
- (string= ,checksum (checksum-world)))
- (lambda ()
- (cl-nl:boot)
- (cl-nl:run-commands ,commands)
- (cl-nl.nvm:export-world)
- )
- (lambda () ,commands))
- *tests*)))
+ (list ,name ,test-fn ,debug-fn ,scala-prog ,scala-input)
+ *tests*)))
+
+; To be used only with the simplest of tests, just a list of commands and a checksum of the
+; world after they've been run.
+(defmacro defsimplecommandtest (name commands checksum)
+ `(defsimpletest
+ ,name
+ (lambda ()
+ (cl-nl:boot)
+ (cl-nl:run-commands ,commands)
+ (string= ,checksum (checksum-world)))
+ (lambda ()
+ (cl-nl:boot)
+ (cl-nl:run-commands ,commands)
+ (format nil "~A~A"
+ (cl-nl.nvm:export-world)
+ (checksum-world)))
+ "bin/runcmd.scala"
+ (format nil "~A~%" ,commands)))
+
+(defmacro defsimplereportertest (name reporter value checksum)
+ `(defsimpletest
+ ,name
+ (lambda ()
+ (cl-nl:boot)
+ (and
+ (string= (cl-nl.nvm:dump-object (cl-nl:run-reporter ,reporter)) ,value)
+ (string= ,checksum (checksum-world))))
+ (lambda ()
+ (cl-nl:boot)
+ (format nil "~A~%~A~A"
+ (cl-nl.nvm:dump-object (cl-nl:run-reporter ,reporter))
+ (cl-nl.nvm:export-world)
+ (checksum-world)))
+ "bin/runreporter.scala"
+ (format nil "~A~%" ,reporter)))