Skip to content

Commit

Permalink
Removed unnecessary include
Browse files Browse the repository at this point in the history
  • Loading branch information
zwhzzz0821 committed Dec 15, 2024
1 parent 188a86f commit 879f41e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
17 changes: 0 additions & 17 deletions cpp/test/parser/path_name_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,12 @@
*/
#include <gtest/gtest.h>

#include "parser/generated/PathParser.h"
#include "parser/generated/PathLexer.h"
#include "common/path.h"

namespace storage {

class PathNameTest : public ::testing::Test {};

TEST_F(PathNameTest, TestPathLexer) {
antlr4::ANTLRInputStream input(std::string("root.sg1.'.d1'.s1"));
PathLexer lexer(&input);
antlr4::CommonTokenStream tokens(&lexer);
tokens.fill();
std::vector<std::string> actualTokens;
for (const auto& token : tokens.getTokens()) {
if (token->getType() != antlr4::Token::EOF) {
actualTokens.push_back(token->getText());
}
}
std::vector<std::string> expectedTokens = {"root", ".", "sg1", ".", "'.d1'", ".", "s1"};
EXPECT_EQ(actualTokens, expectedTokens);
}

TEST_F(PathNameTest, TestLegalPath) {
// empty path
Path a("", true);
Expand Down
1 change: 1 addition & 0 deletions cpp/third_party/antlr4-cpp-runtime-4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
cmake_minimum_required (VERSION 3.10)
# 2.8 needed because of ExternalProject
# Detect build type, fallback to release and throw a warning if use didn't specify any
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(NOT CMAKE_BUILD_TYPE)
message(WARNING "Build type not set, falling back to Release mode.
To specify build type use:
Expand Down

0 comments on commit 879f41e

Please sign in to comment.