-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for deprecated usage of utils
- Loading branch information
1 parent
13f35d9
commit 0e73b66
Showing
7 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//===- UtilsDeprecatedGlobals.test.cpp --------------------------*- C++ -*-===// | ||
// | ||
// Copyright (C) 2024 GrammaTech, Inc. | ||
// | ||
// This code is licensed under the MIT license. See the LICENSE file in the | ||
// project root for license terms. | ||
// | ||
// This project is sponsored by the Office of Naval Research, One Liberty | ||
// Center, 875 N. Randolph Street, Arlington, VA 22203 under contract # | ||
// N68335-17-C-0700. The content of the information does not necessarily | ||
// reflect the position or policy of the Government and no official | ||
// endorsement should be inferred. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#include <gtirb/Allocator.hpp> | ||
#include <gtest/gtest.h> | ||
|
||
/* | ||
Ensure it is possible to use utility functions with no namespace if | ||
GTIRB_WRAP_UTILS_IN_NAMESPACE is not defined. | ||
*/ | ||
TEST(Unit_IR, globalNextPowerOfTwo) { EXPECT_EQ(NextPowerOf2(5), 8U); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//===- UtilsUsingGtirbNamespace.test.cpp ------------------------*- C++ -*-===// | ||
// | ||
// Copyright (C) 2024 GrammaTech, Inc. | ||
// | ||
// This code is licensed under the MIT license. See the LICENSE file in the | ||
// project root for license terms. | ||
// | ||
// This project is sponsored by the Office of Naval Research, One Liberty | ||
// Center, 875 N. Randolph Street, Arlington, VA 22203 under contract # | ||
// N68335-17-C-0700. The content of the information does not necessarily | ||
// reflect the position or policy of the Government and no official | ||
// endorsement should be inferred. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#define GTIRB_WRAP_UTILS_IN_NAMESPACE | ||
#include <gtirb/Allocator.hpp> | ||
#include <gtest/gtest.h> | ||
|
||
/* | ||
Ensure it is possible to use utility functions by using the gtirb namesapce when | ||
GTIRB_WRAP_UTILS_IN_NAMESPACE is defined. | ||
*/ | ||
using namespace gtirb; | ||
TEST(Unit_IR, namespacedNextPowerOfTwo) { EXPECT_EQ(NextPowerOf2(5), 8U); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters