Organzing tests
svn: r6449
This commit is contained in:
parent
59b3b26939
commit
4a39355dfc
|
@ -1,25 +1,25 @@
|
|||
(module all-web-server-tests mzscheme
|
||||
(require (planet "graphical-ui.ss" ("schematics" "schemeunit.plt" 2))
|
||||
(planet "text-ui.ss" ("schematics" "schemeunit.plt" 2))
|
||||
(planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
||||
"./graveyard/persistent-close-test.ss"
|
||||
"./lang/anormal-test.ss"
|
||||
"./lang/labels-test.ss"
|
||||
"./lang/stuff-url-test.ss"
|
||||
"./lang/web-param-test.ss"
|
||||
"./lang-test.ss"
|
||||
"./private/define-closure-test.ss"
|
||||
"./private/request-test.ss"
|
||||
"./servlet-env-test.ss")
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
||||
"configuration/all-configuration-tests.ss"
|
||||
"dispatchers/all-dispatchers-tests.ss"
|
||||
"graveyard/all-graveyard-tests.ss"
|
||||
"lang/all-lang-tests.ss"
|
||||
"lang-test.ss"
|
||||
"managers/all-managers-tests.ss"
|
||||
"private/all-private-tests.ss"
|
||||
"servlet/all-servlet-tests.ss"
|
||||
"servlet-env-test.ss")
|
||||
(provide all-web-server-tests)
|
||||
|
||||
(test/graphical-ui
|
||||
(test-suite
|
||||
"Web Server"
|
||||
persistent-close-tests
|
||||
anormal-tests
|
||||
labels-tests
|
||||
stuff-url-tests
|
||||
web-param-tests
|
||||
lang-tests
|
||||
define-closure-tests
|
||||
request-tests)))
|
||||
(define all-web-server-tests
|
||||
(test-suite
|
||||
"Web Server"
|
||||
all-configuration-tests
|
||||
all-dispatchers-tests
|
||||
all-graveyard-tests
|
||||
all-lang-tests
|
||||
lang-tests
|
||||
all-managers-tests
|
||||
all-private-tests
|
||||
all-servlet-tests
|
||||
servlet-env-tests)))
|
|
@ -0,0 +1,7 @@
|
|||
(module all-configuration-tests mzscheme
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)))
|
||||
(provide all-configuration-tests)
|
||||
|
||||
(define all-configuration-tests
|
||||
(test-suite
|
||||
"Configuration")))
|
|
@ -0,0 +1,7 @@
|
|||
(module all-dispatchers-tests mzscheme
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)))
|
||||
(provide all-dispatchers-tests)
|
||||
|
||||
(define all-dispatchers-tests
|
||||
(test-suite
|
||||
"Dispatchers")))
|
|
@ -0,0 +1,9 @@
|
|||
(module all-graveyard-tests mzscheme
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
||||
"persistent-close-test.ss")
|
||||
(provide all-graveyard-tests)
|
||||
|
||||
(define all-graveyard-tests
|
||||
(test-suite
|
||||
"Graveyard"
|
||||
persistent-close-tests)))
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
(define persistent-close-tests
|
||||
(test-suite
|
||||
"Tests for persistent-close.ss"
|
||||
"Persistent Closures"
|
||||
|
||||
(test-case
|
||||
"file-vector references"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
(define lang-tests
|
||||
(test-suite
|
||||
"Test the Web language"
|
||||
"Web Language Servlets"
|
||||
|
||||
;; ****************************************
|
||||
;; ****************************************
|
||||
|
|
15
collects/web-server/tests/lang/all-lang-tests.ss
Normal file
15
collects/web-server/tests/lang/all-lang-tests.ss
Normal file
|
@ -0,0 +1,15 @@
|
|||
(module all-lang-tests mzscheme
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
||||
"anormal-test.ss"
|
||||
"labels-test.ss"
|
||||
"stuff-url-test.ss"
|
||||
"web-param-test.ss")
|
||||
(provide all-lang-tests)
|
||||
|
||||
(define all-lang-tests
|
||||
(test-suite
|
||||
"Web Language"
|
||||
anormal-tests
|
||||
labels-tests
|
||||
stuff-url-tests
|
||||
web-param-tests)))
|
|
@ -137,7 +137,7 @@
|
|||
|
||||
(define anormal-tests
|
||||
(test-suite
|
||||
"Tests for Normalization Phase"
|
||||
"Anormalization"
|
||||
(test-suite
|
||||
"Base Cases"
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
(define labels-tests
|
||||
(test-suite
|
||||
"Tests for labels.ss"
|
||||
"Module Labeling"
|
||||
|
||||
(test-case
|
||||
"Test the tag incrementing scheme"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
(define stuff-url-tests
|
||||
(test-suite
|
||||
"Tests for stuff-url.ss"
|
||||
"Stuff URL"
|
||||
|
||||
(test-case
|
||||
"compose url-parts and recover-serial (1)"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
(define web-param-tests
|
||||
(test-suite
|
||||
"Test Web Parameters"
|
||||
"Web Parameters"
|
||||
|
||||
;; ****************************************
|
||||
;; ****************************************
|
||||
|
|
7
collects/web-server/tests/managers/all-managers-tests.ss
Normal file
7
collects/web-server/tests/managers/all-managers-tests.ss
Normal file
|
@ -0,0 +1,7 @@
|
|||
(module all-managers-tests mzscheme
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)))
|
||||
(provide all-managers-tests)
|
||||
|
||||
(define all-managers-tests
|
||||
(test-suite
|
||||
"Continuation Managers")))
|
11
collects/web-server/tests/private/all-private-tests.ss
Normal file
11
collects/web-server/tests/private/all-private-tests.ss
Normal file
|
@ -0,0 +1,11 @@
|
|||
(module all-private-tests mzscheme
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
||||
"define-closure-test.ss"
|
||||
"request-test.ss")
|
||||
(provide all-private-tests)
|
||||
|
||||
(define all-private-tests
|
||||
(test-suite
|
||||
"Internal"
|
||||
define-closure-tests
|
||||
request-tests)))
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
(define define-closure-tests
|
||||
(test-suite
|
||||
"Tests for closure.ss"
|
||||
"Define Closure"
|
||||
|
||||
(test-case
|
||||
"serialize id procedure"
|
||||
|
|
|
@ -38,13 +38,15 @@
|
|||
|
||||
(define request-tests
|
||||
(test-suite
|
||||
"tests for parsing bindings"
|
||||
(test-equal? "simple test 1"
|
||||
(get-post-data/raw "hello world") #"hello world")
|
||||
(test-equal? "simple test 2"
|
||||
(get-post-data/raw "hello=world") #"hello=world")
|
||||
(test-equal? "simple test 3"
|
||||
(binding:form-value (bindings-assq #"hello" (get-bindings "hello=world")))
|
||||
#"world")))
|
||||
"Request Parsing"
|
||||
(test-suite
|
||||
"Bindings"
|
||||
(test-equal? "simple test 1"
|
||||
(get-post-data/raw "hello world") #"hello world")
|
||||
(test-equal? "simple test 2"
|
||||
(get-post-data/raw "hello=world") #"hello=world")
|
||||
(test-equal? "simple test 3"
|
||||
(binding:form-value (bindings-assq #"hello" (get-bindings "hello=world")))
|
||||
#"world"))))
|
||||
|
||||
(provide request-tests))
|
6
collects/web-server/tests/run-all-tests.ss
Normal file
6
collects/web-server/tests/run-all-tests.ss
Normal file
|
@ -0,0 +1,6 @@
|
|||
(module run-all-tests mzscheme
|
||||
(require (planet "graphical-ui.ss" ("schematics" "schemeunit.plt" 2))
|
||||
(planet "text-ui.ss" ("schematics" "schemeunit.plt" 2))
|
||||
"all-web-server-tests.ss")
|
||||
|
||||
(test/graphical-ui all-web-server-tests))
|
|
@ -1,5 +1,13 @@
|
|||
(module servlet-env-test mzscheme
|
||||
(require (lib "servlet-env.ss" "web-server"))
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
||||
(lib "servlet-env.ss" "web-server"))
|
||||
(provide servlet-env-tests)
|
||||
|
||||
(define servlet-env-tests
|
||||
(test-suite
|
||||
"Servlet Environment"))
|
||||
|
||||
; XXX Turn below into tests
|
||||
|
||||
; request-number : str -> num
|
||||
(define (request-number which-number)
|
||||
|
|
7
collects/web-server/tests/servlet/all-servlet-tests.ss
Normal file
7
collects/web-server/tests/servlet/all-servlet-tests.ss
Normal file
|
@ -0,0 +1,7 @@
|
|||
(module all-servlet-tests mzscheme
|
||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)))
|
||||
(provide all-servlet-tests)
|
||||
|
||||
(define all-servlet-tests
|
||||
(test-suite
|
||||
"Servlet")))
|
Loading…
Reference in New Issue
Block a user