You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Conception/drake-master/common/test/drake_throw_test.cc

17 lines
331 B

#include "drake/common/drake_throw.h"
#include <stdexcept>
#include <gtest/gtest.h>
#include "drake/common/test_utilities/expect_no_throw.h"
namespace {
GTEST_TEST(DrakeThrowTest, BasicTest) {
DRAKE_EXPECT_NO_THROW(DRAKE_THROW_UNLESS(true));
EXPECT_THROW(DRAKE_THROW_UNLESS(false), std::runtime_error);
}
} // namespace