cs136 / seashell

Seashell is an online environment for editing, running, and submitting C programming assignments.
GNU General Public License v3.0
38 stars 19 forks source link

Add database integration tests. #751

Closed e45lee closed 7 years ago

e45lee commented 7 years ago

Something that extends the little demo in the PR would be nice:

;(define foo (new sync-database% [path 'memory]))
;(send foo apply-create "test" "12345" #{(hash 'bar #{(hash) :: JSExpr}) :: (HashTable Symbol JSExpr)} #f)
;(send foo apply-update "test" "12345" #{(hash 'foo.baz 2) :: (HashTable Symbol JSExpr)} #f)
;(send foo fetch "test" "12345")
;(send foo apply-partial-update "test" "12345" #{(hash 'foo.baz 10) :: (HashTable Symbol JSExpr)} #f)
;(send foo apply-partial-delete "test" "X")
;(send foo fetch "test" "12345")
;(send foo apply-partials 3)
;(send foo fetch "test" "12345")
kpalway commented 7 years ago

My PR now contains these tests (haven't expanded on them yet) integrated into our existing racket tests