diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2021-02-26 19:51:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-27 03:51:25 +0000 |
commit | 36f2a15ab09ceb741d260f5ee6911f4cf8e3f4bf (patch) | |
tree | 883f4cbbc3edabab3dc345671b23922d51ffa682 /test/unit/util/exception_black.h | |
parent | da9dc0ccaa700b746706f85b89fe5f1cd12f7011 (diff) |
google test: util: Migrate exception_black. (#6020)
Diffstat (limited to 'test/unit/util/exception_black.h')
-rw-r--r-- | test/unit/util/exception_black.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/test/unit/util/exception_black.h b/test/unit/util/exception_black.h deleted file mode 100644 index a475f226e..000000000 --- a/test/unit/util/exception_black.h +++ /dev/null @@ -1,57 +0,0 @@ -/********************* */ -/*! \file exception_black.h - ** \verbatim - ** Top contributors (to current version): - ** Morgan Deters, Andres Noetzli - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS - ** in the top-level source directory and their institutional affiliations. - ** All rights reserved. See the file COPYING in the top-level source - ** directory for licensing information.\endverbatim - ** - ** \brief Black box testing of CVC4::Exception. - ** - ** Black box testing of CVC4::Exception. - **/ - -#include <cxxtest/TestSuite.h> - -#include <iostream> -#include <sstream> - -#include "base/exception.h" - -using namespace CVC4; -using namespace std; - -class ExceptionBlack : public CxxTest::TestSuite { - public: - void setUp() override {} - - void tearDown() override {} - - // CVC4::Exception is a simple class, just test it all at once. - void testExceptions() - { - Exception e1; - Exception e2(string("foo!")); - Exception e3("bar!"); - - TS_ASSERT_EQUALS(e1.toString(), string("Unknown exception")); - TS_ASSERT_EQUALS(e2.toString(), string("foo!")); - TS_ASSERT_EQUALS(e3.toString(), string("bar!")); - - e1.setMessage("blah"); - e2.setMessage("another"); - e3.setMessage("three of 'em!"); - - stringstream s1, s2, s3; - s1 << e1; - s2 << e2; - s3 << e3; - - TS_ASSERT_EQUALS(s1.str(), string("blah")); - TS_ASSERT_EQUALS(s2.str(), string("another")); - TS_ASSERT_EQUALS(s3.str(), string("three of 'em!")); - } -}; |