2010-09-04 21:05:28 -04:00
|
|
|
USING: continuations db db.sqlite io.directories io.files.temp
|
2010-09-17 02:52:49 -04:00
|
|
|
webapps.mason.backend tools.test ;
|
|
|
|
IN: webapps.mason.backend.tests
|
2010-09-04 21:05:28 -04:00
|
|
|
|
|
|
|
[ "test.db" temp-file delete-file ] ignore-errors
|
|
|
|
|
2010-09-05 16:11:17 -04:00
|
|
|
[ 0 1 2 ] [
|
2010-09-30 23:35:35 -04:00
|
|
|
! Do it in a with-transaction to simulate semantics of
|
|
|
|
! with-mason-db
|
2010-09-04 21:05:28 -04:00
|
|
|
"test.db" temp-file <sqlite-db> [
|
2010-09-30 23:35:35 -04:00
|
|
|
[
|
|
|
|
init-mason-db
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2010-09-30 23:35:35 -04:00
|
|
|
counter-value
|
|
|
|
increment-counter-value
|
|
|
|
increment-counter-value
|
|
|
|
] with-transaction
|
2010-09-04 21:05:28 -04:00
|
|
|
] with-db
|
|
|
|
] unit-test
|