From c9a34ca9f6834b0c6f72b84abb0a767de902680b Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Sat, 1 Jun 2024 04:09:51 +0100 Subject: [PATCH] Fix test with json rounding issues: This change addresses a possible confusion with JSONS processors trimming significant zero digits from the fractional part of floating numbers. It changes zeros to nonzeros in the fractional part, as a way to enforce the processors to keep the digits. Another possible solution is to keep the YAML as-is, and ensure the json shows the prices as 450.00 and 2392.00; ie to change the json part to be string-equal to the yaml part. --- src/UGM3.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/UGM3.yaml b/src/UGM3.yaml index cf46bf27..a8df4146 100644 --- a/src/UGM3.yaml +++ b/src/UGM3.yaml @@ -21,11 +21,11 @@ - sku : BL394D quantity : 4 description : Basketball - price : 450.00 + price : 450.12 - sku : BL4438H quantity : 1 description : Super Hoop - price : 2392.00 + price : 2392.34 tax : 251.42 total: 4443.52 comments: @@ -70,7 +70,7 @@ =VAL :description =VAL :Basketball =VAL :price - =VAL :450.00 + =VAL :450.12 -MAP +MAP =VAL :sku @@ -80,7 +80,7 @@ =VAL :description =VAL :Super Hoop =VAL :price - =VAL :2392.00 + =VAL :2392.34 -MAP -SEQ =VAL :tax @@ -121,13 +121,13 @@ "sku": "BL394D", "quantity": 4, "description": "Basketball", - "price": 450 + "price": 450.12 }, { "sku": "BL4438H", "quantity": 1, "description": "Super Hoop", - "price": 2392 + "price": 2392.34 } ], "tax": 251.42, @@ -153,11 +153,11 @@ - sku: BL394D quantity: 4 description: Basketball - price: 450.00 + price: 450.12 - sku: BL4438H quantity: 1 description: Super Hoop - price: 2392.00 + price: 2392.34 tax: 251.42 total: 4443.52 comments: Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.