Fix decimal separator format in calculator tool tests (#315)
## Changes - Updated `DecimalFormatSymbols` to use period as decimal separator (Locale.US) - Fixed test expectations in `testComplexInputSchemaTool`: - `formattedResult`: `"11,000"` → `"11.000"` - `tags`: Added actual test values `["test", "calculator", "integration"]` - Fixed test expectations in `testComplexNestedSchema`: - `formattedResult`: `"0,00"` → `"0.00"` ## Motivation 1. **Standard Decimal Notation**: Using a comma as a decimal separator could be confusing as it's commonly used for thousands separators in many locales. Standardizing on the period (`.`) follows international conventions and makes the output clearer. 2. **Test Data Correction**: During the Validate PR workflow for #289, discovered that the `tags` array in the `expectedContent` variable of `testComplexInputSchemaTool()` was incorrectly set to an empty array, which didn't match the actual input values being tested. --------- Co-authored-by: MAERYO <maeryo@hanwha.com>
This commit is contained in:
parent
407df7a3a4
commit
8f9f484e33
1 changed files with 3 additions and 3 deletions
|
|
@ -289,7 +289,7 @@ abstract class AbstractToolIntegrationTest : KotlinTestBase() {
|
|||
}
|
||||
|
||||
val pattern = if (precision > 0) "0." + "0".repeat(precision) else "0"
|
||||
val symbols = DecimalFormatSymbols(Locale.US).apply { decimalSeparator = ',' }
|
||||
val symbols = DecimalFormatSymbols(Locale.US).apply { decimalSeparator = '.' }
|
||||
val df = DecimalFormat(pattern, symbols).apply { isGroupingUsed = false }
|
||||
val formattedResult = df.format(result)
|
||||
|
||||
|
|
@ -482,7 +482,7 @@ abstract class AbstractToolIntegrationTest : KotlinTestBase() {
|
|||
"a" : 5.5,
|
||||
"b" : 2.0,
|
||||
"result" : 11.0,
|
||||
"formattedResult" : "11,000",
|
||||
"formattedResult" : "11.000",
|
||||
"precision" : 3,
|
||||
"tags" : ["test", "calculator", "integration"]
|
||||
}
|
||||
|
|
@ -633,7 +633,7 @@ abstract class AbstractToolIntegrationTest : KotlinTestBase() {
|
|||
"a": 0.0,
|
||||
"b": 0.0,
|
||||
"result": 0.0,
|
||||
"formattedResult": "0,00",
|
||||
"formattedResult": "0.00",
|
||||
"precision": 2,
|
||||
"tags": []
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue