Skip to content

Commit

Permalink
added parser test
Browse files Browse the repository at this point in the history
  • Loading branch information
drexlerd committed Feb 17, 2024
1 parent d02a8d1 commit a44e2aa
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
STRING "Choose the type of build." FORCE)
endif()

set(CMAKE_BUILD_TYPE "Release")

message(STATUS "Build configuration: ${CMAKE_BUILD_TYPE}")

# make cache variables for install destinations
include(GNUInstallDirs)

Expand All @@ -46,6 +50,12 @@ else()
endif()


set(DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/data/")
add_definitions(-DDATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data/")
message("DATA_DIR: ${DATA_DIR}")



##############################################################
# CMake modules and macro files
##############################################################
Expand Down
31 changes: 31 additions & 0 deletions tests/unit/domain/parser.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (C) 2023 Dominik Drexler
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "../../../include/loki/domain/parser.hpp"

#include <gtest/gtest.h>


namespace loki::domain::tests {

TEST(LokiTests, DomainParserTest) {
const auto domain_file = fs::path(std::string(DATA_DIR) + "gripper/domain.pddl");
const auto problem_file = fs::path(std::string(DATA_DIR) + "gripper/problem.pddl");
DomainParser parser(domain_file);
}

}

0 comments on commit a44e2aa

Please sign in to comment.