Add memgraph namespace
This commit is contained in:
committed by
János Benjamin Antal
parent
b33d2c3940
commit
12b4ec1589
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Memgraph Ltd.
|
||||
// Copyright 2022 Memgraph Ltd.
|
||||
//
|
||||
// Use of this software is governed by the Business Source License
|
||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||
@@ -12,19 +12,19 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <utils/exceptions.hpp>
|
||||
|
||||
void i_will_throw() { throw utils::BasicException("this is not ok"); }
|
||||
void i_will_throw() { throw memgraph::utils::BasicException("this is not ok"); }
|
||||
|
||||
void bar() { i_will_throw(); }
|
||||
|
||||
void foo() { bar(); }
|
||||
|
||||
void i_will_throw_stacktrace_exception() { throw utils::StacktraceException("this is not {}", "ok!"); }
|
||||
void i_will_throw_stacktrace_exception() { throw memgraph::utils::StacktraceException("this is not {}", "ok!"); }
|
||||
|
||||
void bar_stacktrace() { i_will_throw_stacktrace_exception(); }
|
||||
|
||||
void foo_stacktrace() { bar_stacktrace(); }
|
||||
|
||||
TEST(ExceptionsTest, ThrowBasicAndStackExceptions) {
|
||||
ASSERT_THROW(foo(), utils::BasicException);
|
||||
ASSERT_THROW(foo_stacktrace(), utils::StacktraceException);
|
||||
ASSERT_THROW(foo(), memgraph::utils::BasicException);
|
||||
ASSERT_THROW(foo_stacktrace(), memgraph::utils::StacktraceException);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user