From 51be68b7d699a75601b7d30e770a0ae35a3bb2c9 Mon Sep 17 00:00:00 2001 From: Felix Baum Date: Fri, 8 Nov 2024 23:29:06 +0100 Subject: [PATCH] renamed main executable to eh_playground --- CMakeLists.txt | 2 +- README.md | 19 +++++++++++++------ src/{extendible_hashing.cpp => main.cpp} | 2 +- tests/CMakeLists.txt | 12 ++++++------ 4 files changed, 21 insertions(+), 14 deletions(-) rename src/{extendible_hashing.cpp => main.cpp} (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2346725..7437279 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.7) project( - extendible_hashing + eh_playground VERSION 1.1 DESCRIPTION "Playground for an Extendible Hashing datastructure." LANGUAGES CXX diff --git a/README.md b/README.md index 0be6047..c316cad 100644 --- a/README.md +++ b/README.md @@ -6,25 +6,32 @@ It was originally written for the ADS-Course of University of Vienna. ## Setup To try the Set out, a testprogram is provided (that is heavily influenced by a testprogram from the university course). -To run the Program, compile the file `extendible_hashing.cpp` using CMake and run it: +To run the Program, compile the file `eh_playground +.cpp` using CMake and run it: ```bash mkdir build && cd build cmake .. && make -./extendible_hashing +./eh_playground + ``` You can also set the program to nonverbose by setting the verbose flag ```bash -./extendible_hashing -v -./extendible_hashing --verbose +./eh_playground + -v +./eh_playground + --verbose ``` For more Information run + ```bash -./extendible_hashing -h -./extendible_hashing --help +./eh_playground + -h +./eh_playground + --help ``` ## Interface diff --git a/src/extendible_hashing.cpp b/src/main.cpp similarity index 98% rename from src/extendible_hashing.cpp rename to src/main.cpp index ae64a0b..ff812f5 100644 --- a/src/extendible_hashing.cpp +++ b/src/main.cpp @@ -132,7 +132,7 @@ void run(bool verbose) { case 'q': return; default: - std::cout << "unknown command\n"; + std::cout << "unknown command. Try 'h' for more Information.\n"; } if (verbose && changed) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7e19281..da5990c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,26 +1,26 @@ add_test( NAME cli_help_long - COMMAND $ --help + COMMAND $ --help ) add_test( NAME cli_help_short - COMMAND $ -h + COMMAND $ -h ) add_test( NAME cli_version_long - COMMAND $ --version + COMMAND $ --version ) add_test( NAME cli_version_short - COMMAND $ -V + COMMAND $ -V ) add_test( NAME cli_unknown_long - COMMAND $ --unknown + COMMAND $ --unknown ) add_test( NAME cli_unknown_short - COMMAND $ -u + COMMAND $ -u ) set(version_regex "${PROJECT_NAME} ${PROJECT_VERSION}")