From 2367a16f34b79548965fab1bbac0ccc965aab2e4 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Wed, 12 Jun 2019 14:22:56 +0000 Subject: simplify test --- vespalib/src/tests/stllike/asciistream_test.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'vespalib/src/tests/stllike') diff --git a/vespalib/src/tests/stllike/asciistream_test.cpp b/vespalib/src/tests/stllike/asciistream_test.cpp index e38a7e8b3e5..03ecb878476 100644 --- a/vespalib/src/tests/stllike/asciistream_test.cpp +++ b/vespalib/src/tests/stllike/asciistream_test.cpp @@ -515,21 +515,13 @@ void AsciistreamTest::testFloat() { float f = 0; asciistream as("-5.490412E-39"); - try { - as >> f; - } catch (std::exception &e) { - EXPECT_EQUAL("should not reach this point", e.what()); - } + as >> f; EXPECT_EQUAL(f, -5.490412E-39f); as.clear(); as << "0.0001E-50"; f = 42.0; - try { - as >> f; - } catch (std::exception &e) { - EXPECT_EQUAL("should not reach this point", e.what()); - } + as >> f; EXPECT_EQUAL(f, 0.0); as.clear(); -- cgit v1.2.3