From 497f5a39a4ca675ed9bb59058ee64f6072c6596e Mon Sep 17 00:00:00 2001 From: Hugo van der Merwe <17109322+hugovdm@users.noreply.github.com> Date: Wed, 29 Apr 2020 17:11:28 +0200 Subject: [PATCH] Remove the 'FIXME_skip_tests' bool and branch. --- icu4c/source/test/intltest/unitstest.cpp | 50 +++++++++++------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/icu4c/source/test/intltest/unitstest.cpp b/icu4c/source/test/intltest/unitstest.cpp index e4e3491556c..62432d068d9 100644 --- a/icu4c/source/test/intltest/unitstest.cpp +++ b/icu4c/source/test/intltest/unitstest.cpp @@ -306,35 +306,29 @@ void unitsTestDataLineFn(void *context, char *fields[][2], int32_t fieldCount, U quantity.length(), quantity.data(), x.length(), x.data(), y.length(), y.data(), expected, commentConversionFormula.length(), commentConversionFormula.data()); - bool FIXME_skip_tests = false; - if (FIXME_skip_tests) { - unitsTest->logln("FIXME: skipping tests related to UnitConverter(«%s», «%s», status).", - sourceUnit.getIdentifier(), targetUnit.getIdentifier()); - } else { - // Convertibility: - auto convertibility = checkConvertibility(sourceUnit, targetUnit, *ctx->conversionRates, status); - if (status.errIfFailureAndReset("checkConvertibility(<%s>, <%s>, ...)", - sourceUnit.getIdentifier(), targetUnit.getIdentifier())) { - return; - } - CharString msg; - msg.append("convertible: ", status) - .append(sourceUnit.getIdentifier(), status) - .append(" -> ", status) - .append(targetUnit.getIdentifier(), status); - if (status.errIfFailureAndReset("msg construction")) { return; } - unitsTest->assertTrue(msg.data(), convertibility != UNCONVERTIBLE); - - // TODO(hugovdm,younies): the following code can be uncommented (and - // fixed) once merged with a UnitConverter branch: - // UnitConverter converter(sourceUnit, targetUnit, unitsTest->conversionRates_, status); - // if (status.errIfFailureAndReset("constructor: UnitConverter(<%s>, <%s>, status)", - // sourceUnit.getIdentifier(), targetUnit.getIdentifier())) { - // return; - // } - // double got = converter.convert(1000); - // unitsTest->assertEqualsNear(fields[0][0], expected, got, 0.0001); + // Convertibility: + auto convertibility = checkConvertibility(sourceUnit, targetUnit, *ctx->conversionRates, status); + if (status.errIfFailureAndReset("checkConvertibility(<%s>, <%s>, ...)", sourceUnit.getIdentifier(), + targetUnit.getIdentifier())) { + return; } + CharString msg; + msg.append("convertible: ", status) + .append(sourceUnit.getIdentifier(), status) + .append(" -> ", status) + .append(targetUnit.getIdentifier(), status); + if (status.errIfFailureAndReset("msg construction")) { return; } + unitsTest->assertTrue(msg.data(), convertibility != UNCONVERTIBLE); + + // TODO(hugovdm,younies): the following code can be uncommented (and + // fixed) once merged with a UnitConverter branch: + // UnitConverter converter(sourceUnit, targetUnit, unitsTest->conversionRates_, status); + // if (status.errIfFailureAndReset("constructor: UnitConverter(<%s>, <%s>, status)", + // sourceUnit.getIdentifier(), targetUnit.getIdentifier())) { + // return; + // } + // double got = converter.convert(1000); + // unitsTest->assertEqualsNear(fields[0][0], expected, got, 0.0001); } /** -- 2.40.0