Case sensitivity
svn: r7063
This commit is contained in:
parent
b892227a26
commit
d4f72cbeae
|
@ -6,7 +6,7 @@
|
|||
(|[| |]|)))))
|
||||
|
||||
|
||||
(SECTION 'add-token)
|
||||
(Section 'add-token)
|
||||
(send t add-token #f 12)
|
||||
(test '(((0 12 (#f . 12))) ())
|
||||
'add-token
|
||||
|
@ -28,7 +28,7 @@
|
|||
'add-token
|
||||
(send t test))
|
||||
|
||||
(SECTION 'split-tree)
|
||||
(Section 'split-tree)
|
||||
(define (build-tree)
|
||||
(set! t (new paren-tree% (matches '((|(| |)|) (|[| |]|)))))
|
||||
(send t add-token #f 2)
|
||||
|
@ -91,7 +91,7 @@
|
|||
(set! t (new paren-tree% (matches '((|(| |)|) (|[| |]|)))))
|
||||
(split-test 0 '(()()))
|
||||
|
||||
(SECTION 'merge-tree)
|
||||
(Section 'merge-tree)
|
||||
(build-tree)
|
||||
(send t split-tree 6)
|
||||
(send t merge-tree 10)
|
||||
|
@ -117,7 +117,7 @@
|
|||
'merge-tree
|
||||
(send t test))
|
||||
|
||||
(SECTION 'truncate)
|
||||
(Section 'truncate)
|
||||
(build-tree)
|
||||
(send t truncate 0)
|
||||
(test '(()())
|
||||
|
@ -152,7 +152,7 @@
|
|||
'add-token
|
||||
(send t test))
|
||||
|
||||
(SECTION 'is-open-pos?)
|
||||
(Section 'is-open-pos?)
|
||||
(build-tree)
|
||||
(test '|)| 'is-open-pos? (send t is-open-pos? 0))
|
||||
(test '|]| 'is-open-pos? (send t is-open-pos? 2))
|
||||
|
@ -164,7 +164,7 @@
|
|||
(test #f 'is-open-pos? (send t is-open-pos? 14))
|
||||
(test #f 'is-open-pos? (send t is-open-pos? 16))
|
||||
|
||||
(SECTION 'is-close-pos?)
|
||||
(Section 'is-close-pos?)
|
||||
(test #f 'is-close-pos? (send t is-close-pos? 0))
|
||||
(test #f 'is-close-pos? (send t is-close-pos? 2))
|
||||
(test '|[| 'is-close-pos? (send t is-close-pos? 4))
|
||||
|
@ -175,7 +175,7 @@
|
|||
(test '|(| 'is-close-pos? (send t is-close-pos? 14))
|
||||
(test #f 'is-close-pos? (send t is-close-pos? 16))
|
||||
|
||||
(SECTION 'match)
|
||||
(Section 'match)
|
||||
(define (test-match-forward num res)
|
||||
(let-values (((a b c) (send t match-forward num)))
|
||||
(test res 'match-forward (list a b c))))
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
(test sp 'get-root-start-position (send t get-root-start-position))
|
||||
(test ep 'get-root-end-position (send t get-root-end-position)))
|
||||
|
||||
(SECTION 'init-tree)
|
||||
(Section 'init-tree)
|
||||
(test #f 'is-empty (send t is-empty?))
|
||||
(check-only-root)
|
||||
(check-root 1 'a 0 1)
|
||||
|
||||
(send t reset-tree)
|
||||
(SECTION 'empty-tree)
|
||||
(Section 'empty-tree)
|
||||
(test #f 'get-root (send t get-root))
|
||||
(test #t 'is-empty (send t is-empty?))
|
||||
(check-root 0 #f 0 0)
|
||||
|
@ -45,20 +45,20 @@
|
|||
|
||||
|
||||
(build-tree 4 #t)
|
||||
(SECTION 'check-tree)
|
||||
(Section 'check-tree)
|
||||
(check-tree 4)
|
||||
(send t search-min!)
|
||||
(check-root 5 '(1 1) 0 5)
|
||||
(send t search-max!)
|
||||
(check-root 5 '(1 2) 35 40)
|
||||
|
||||
(SECTION 'remove-root)
|
||||
(Section 'remove-root)
|
||||
(send t search! 20)
|
||||
(send t remove-root!)
|
||||
(send t search-max!)
|
||||
(check-root 5 '(1 2) 30 35)
|
||||
|
||||
(SECTION 'add-to-root-length)
|
||||
(Section 'add-to-root-length)
|
||||
(send t search-min!)
|
||||
(send t add-to-root-length 1)
|
||||
(check-root 6 '(1 1) 0 6)
|
||||
|
@ -67,7 +67,7 @@
|
|||
(send t search-max!)
|
||||
(check-root 5 '(1 2) 31 36)
|
||||
|
||||
(SECTION 'for-each)
|
||||
(Section 'for-each)
|
||||
(send t reset-tree)
|
||||
(build-tree 4 #f)
|
||||
(let loop ((i 0))
|
||||
|
@ -88,7 +88,7 @@
|
|||
(19 1 (1 2)))
|
||||
'for-each (to-list t))
|
||||
|
||||
(SECTION 'stress)
|
||||
(Section 'stress)
|
||||
(send t reset-tree)
|
||||
(build-tree 100 #f)
|
||||
(let loop ((i 0))
|
||||
|
@ -98,7 +98,7 @@
|
|||
(send t search-max!)
|
||||
(check-root 1 '(1 2) 10099 10100)
|
||||
|
||||
(SECTION 'splits)
|
||||
(Section 'splits)
|
||||
(send t reset-tree)
|
||||
(build-tree 5 #f)
|
||||
(let-values (((s e t1 t2)
|
||||
|
|
Loading…
Reference in New Issue
Block a user