- dirty-mixin class with dirty slot (initform t) - mark-clean clears dirty flag - mark-dirty sets dirty flag - 3 tests: default-dirty, clean, dirty-cycle - ROADMAP.org: v0.2.0 all tasks DONE - 31 component tests, 100% GREEN
21 lines
670 B
Common Lisp
21 lines
670 B
Common Lisp
;; Dirty tracking tests are in box-tests.lisp (same test suite)
|
|
(in-package :cl-tui-box-test)
|
|
|
|
(test dirty-mixin-default-is-dirty
|
|
"A dirty-mixin starts as dirty"
|
|
(let ((c (make-instance 'dirty-mixin)))
|
|
(is-true (dirty-p c) "new component should be dirty")))
|
|
|
|
(test mark-clean-clears-dirty
|
|
"mark-clean sets dirty to nil"
|
|
(let ((c (make-instance 'dirty-mixin)))
|
|
(mark-clean c)
|
|
(is-false (dirty-p c) "after mark-clean, should not be dirty")))
|
|
|
|
(test mark-dirty-sets-dirty
|
|
"mark-dirty sets dirty to t"
|
|
(let ((c (make-instance 'dirty-mixin)))
|
|
(mark-clean c)
|
|
(mark-dirty c)
|
|
(is-true (dirty-p c) "after mark-dirty, should be dirty again")))
|