Fix tests so that they don't fail unnecessarily

- test-begin/test-end names must be consistent
- remove empty test group in test-scm-engine
This commit is contained in:
Christopher Lam
2024-04-29 21:55:42 +08:00
parent 25c02b4822
commit 8fb5a6afd6
6 changed files with 10 additions and 16 deletions

View File

@@ -542,7 +542,7 @@ veritatis et quasi architecto beatae vitae dicta sunt, explicabo.")
((lambda (o) (if o (gnc:option-set-value o '(~f ~f ~f ~f)))) option))
" red blue green alpha)))
(test-begin "test-gnc-coloroption-to-scheme")
(test-begin "test-gnc-color-option-to-scheme")
(let ((odb (gnc:new-options))
(default-color (list #xb2 #x22 #x22 #xff))
(new-color (list #x00 #xca #x3b #xff)))
@@ -579,7 +579,7 @@ veritatis et quasi architecto beatae vitae dicta sunt, explicabo.")
(test-end "test-gnc-invoice-option-to-scheme"))
(define (test-gnc-owner-option-to-scheme)
(test-begin "test-owner-option-to-scheme")
(test-begin "test-gnc-owner-option-to-scheme")
(let ((odb (gnc:new-options)))
(gnc:register-option odb
(gnc:make-owner-option "foo" "bar" "a" "baz"

View File

@@ -54,7 +54,7 @@
(gnc-set-option option-db "foo" "bar" "pepper")
(test-equal "pepper" (gnc-option-value option-db "foo" "bar")))
(test-end "test-gnc-make-string-option"))
(test-end "test-gnc-test-string-option"))
(define (test-gnc-make-account-list-options)
(define (create-account book parent type name)

View File

@@ -5,15 +5,9 @@
(define (run-test)
(test-runner-factory gnc:test-runner)
(test-begin "test-engine")
(test-engine)
(test-gnc-numeric-from-string)
(test-end "test-engine"))
(define (test-engine)
(test-begin "testing function availability")
(test-end "testing deprecated functions"))
(define (test-gnc-numeric-from-string)
(test-equal "gnc-numeric-from-string 1"
1

View File

@@ -340,7 +340,7 @@
(test-equal "DMLR 500 shares" 500 ((caadr (assoc DMLR return-alist)) 'total #f))
(test-equal "DMLR EUR13631.27" 1364127/100 (gnc-numeric-convert ((cdadr (assoc DMLR return-alist)) 'total #f) 100 GNC-HOW-RND-ROUND)))
(test-end "foreign-DEM>EUR")
(test-begin "foreign-3way-DEM>EUR")
(test-begin "foreign-3way-gbp->dem->eur->usd")
;; Three-way conversion, gbp->dem->eur->usd
;; Too many levels for resolve-unknown-comm to resolve.
(collect gbp-dem-col 10000/100 23665543/100000)
@@ -350,7 +350,7 @@
(return-alist (gnc:resolve-unknown-comm sumlist USD)))
(test-equal "Shares fails" #f ((caadr (assoc RDSA return-alist)) 'total #f))
(test-equal "Value fails" #f ((cdadr (assoc RDSA return-alist)) 'total #f)))
(test-end "foreign-3way-GBP>DEM")
(test-end "foreign-3way-gbp->dem->eur->usd")
(test-begin "foreign-3way-DEM>GBP")
;; Three-way conversion, gbp->dem->eur->usd
;; Too many levels for resolve-unknown-comm to resolve.

View File

@@ -16,7 +16,7 @@
(define (run-test)
(test-runner-factory gnc:test-runner)
(test-begin "Testing/Temporary/test-report-html")
(test-begin "test-report-html")
;; if (test-runner-factory gnc:test-runner) is commented out, this
;; will create Testing/Temporary/test-report-html.log
(test-html-document-defintion)
@@ -26,7 +26,7 @@
(test-html-table)
(test-gnc:html-table-add-labeled-amount-line!)
(test-gnc:make-html-acct-table/env/accts)
(test-end "Testing/Temporary/test-report-html")
(test-end "test-report-html")
)
(define html-doc-header-no-title
@@ -84,7 +84,7 @@ HTML Document Title</title></head><body></body>\n\
)
)
(test-end "HTML Document - Creation")
(test-end "HTML Document - Basic Creation")
)
;; -----------------------------------------------------------------------

View File

@@ -6,7 +6,7 @@
(define (run-test)
(test-runner-factory gnc:test-runner)
(test-begin "Testing/Temporary/test-report")
(test-begin "test-report")
;; if (test-runner-factory gnc:test-runner) is commented out, this
;; will create Testing/Temporary/test-asset-performance.log
(test-check1)
@@ -18,7 +18,7 @@
(test-report-template-getters)
(test-make-report)
(test-report)
(test-end "Testing/Temporary/test-report"))
(test-end "test-report"))
(define test4-guid "54c2fc051af64a08ba2334c2e9179e24")
;; -----------------------------------------------------------------------