Fixup qif-imp price unit tests.

The expected results changed with commit 80f7e60f49.
At the same time, improve readability of test results by
assigning a tag and ordering expected vs actual correctly.
This commit is contained in:
Jeremy White 2023-08-30 12:42:27 -05:00 committed by John Ralls
parent 34946c7461
commit 737e732e1c

View File

@ -66,19 +66,19 @@
(let ((parsed (qif-file:parse-price-line "\"ABC\",1.0,\"1/1/04\""))
(model (make-qif-price)))
(qif-price:set-symbol! model "ABC")
(qif-price:set-share-price! model "1.0")
(qif-price:set-share-price! model "1")
(qif-price:set-date! model "1/1/04")
(test-equal parsed model))
(test-equal "parse-price-line-decimal" model parsed))
(let ((parsed (qif-file:parse-price-line "\"ABC\",1 3/4,\"1/1' 4\""))
(model (make-qif-price)))
(qif-price:set-symbol! model "ABC")
(qif-price:set-share-price! model "1.75")
(qif-price:set-share-price! model "7/4")
(qif-price:set-date! model "1/1' 4")
(test-equal parsed model))
(test-equal "parse-price-line-fraction" parsed model))
(let ((parsed (qif-file:parse-price-line "\"ABC\",,\"1/1' 4\"")))
(test-equal parsed #f))
(test-equal "parse-price-line-empty" #f parsed))
(let ((parsed (qif-file:parse-price-line "\"ABC\",\"1/1' 4\"")))
(test-equal parsed #f)))
(test-equal "parse-price-line-missingcomma" #f parsed)))