gnucash stable: Fix tests so that they don't fail unnecessarily
Christopher Lam
clam at code.gnucash.org
Mon Apr 29 19:37:30 EDT 2024
Updated via https://github.com/Gnucash/gnucash/commit/8fb5a6af (commit)
from https://github.com/Gnucash/gnucash/commit/25c02b48 (commit)
commit 8fb5a6afd66547798755446eded07d725f1e8091
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Apr 29 21:55:42 2024 +0800
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
diff --git a/bindings/guile/test/test-gnc-option-scheme-output.scm b/bindings/guile/test/test-gnc-option-scheme-output.scm
index 18407c5c81..efc53736b2 100644
--- a/bindings/guile/test/test-gnc-option-scheme-output.scm
+++ b/bindings/guile/test/test-gnc-option-scheme-output.scm
@@ -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"
diff --git a/bindings/guile/test/test-gnc-optiondb.scm b/bindings/guile/test/test-gnc-optiondb.scm
index 64bcb48424..e5a5bbc415 100644
--- a/bindings/guile/test/test-gnc-optiondb.scm
+++ b/bindings/guile/test/test-gnc-optiondb.scm
@@ -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)
diff --git a/bindings/guile/test/test-scm-engine.scm b/bindings/guile/test/test-scm-engine.scm
index c85791c6c1..9b66fe0af9 100644
--- a/bindings/guile/test/test-scm-engine.scm
+++ b/bindings/guile/test/test-scm-engine.scm
@@ -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
diff --git a/gnucash/report/test/test-commodity-utils.scm b/gnucash/report/test/test-commodity-utils.scm
index d4d8d32900..a680fd861e 100644
--- a/gnucash/report/test/test-commodity-utils.scm
+++ b/gnucash/report/test/test-commodity-utils.scm
@@ -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.
diff --git a/gnucash/report/test/test-report-html.scm b/gnucash/report/test/test-report-html.scm
index 1ab073727c..773a8bbdd9 100644
--- a/gnucash/report/test/test-report-html.scm
+++ b/gnucash/report/test/test-report-html.scm
@@ -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")
)
;; -----------------------------------------------------------------------
diff --git a/gnucash/report/test/test-report.scm b/gnucash/report/test/test-report.scm
index 50386fcdbc..42c616ba23 100644
--- a/gnucash/report/test/test-report.scm
+++ b/gnucash/report/test/test-report.scm
@@ -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")
;; -----------------------------------------------------------------------
Summary of changes:
bindings/guile/test/test-gnc-option-scheme-output.scm | 4 ++--
bindings/guile/test/test-gnc-optiondb.scm | 2 +-
bindings/guile/test/test-scm-engine.scm | 6 ------
gnucash/report/test/test-commodity-utils.scm | 4 ++--
gnucash/report/test/test-report-html.scm | 6 +++---
gnucash/report/test/test-report.scm | 4 ++--
6 files changed, 10 insertions(+), 16 deletions(-)
More information about the gnucash-changes
mailing list