2015-10-03 21:41:32 -04:00
|
|
|
USING: continuations db io.directories io.files.temp tools.test
|
|
|
|
webapps.mason.backend webapps.utils ;
|
2010-09-17 02:52:49 -04:00
|
|
|
IN: webapps.mason.backend.tests
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2014-10-03 06:53:16 -04:00
|
|
|
[ "mason-test.db" temp-file delete-file ] ignore-errors
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2015-07-03 12:39:59 -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
|
2015-10-03 21:41:32 -04:00
|
|
|
"mason-test.db" <temp-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
|