Skip to content

Commit

Permalink
renamed main executable to eh_playground
Browse files Browse the repository at this point in the history
  • Loading branch information
BelimFaux committed Nov 8, 2024
1 parent 46fd6ba commit 51be68b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/extendible_hashing.cpp → src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
add_test(
NAME cli_help_long
COMMAND $<TARGET_FILE:extendible_hashing> --help
COMMAND $<TARGET_FILE:eh_playground> --help
)
add_test(
NAME cli_help_short
COMMAND $<TARGET_FILE:extendible_hashing> -h
COMMAND $<TARGET_FILE:eh_playground> -h
)
add_test(
NAME cli_version_long
COMMAND $<TARGET_FILE:extendible_hashing> --version
COMMAND $<TARGET_FILE:eh_playground> --version
)
add_test(
NAME cli_version_short
COMMAND $<TARGET_FILE:extendible_hashing> -V
COMMAND $<TARGET_FILE:eh_playground> -V
)
add_test(
NAME cli_unknown_long
COMMAND $<TARGET_FILE:extendible_hashing> --unknown
COMMAND $<TARGET_FILE:eh_playground> --unknown
)
add_test(
NAME cli_unknown_short
COMMAND $<TARGET_FILE:extendible_hashing> -u
COMMAND $<TARGET_FILE:eh_playground> -u
)

set(version_regex "${PROJECT_NAME} ${PROJECT_VERSION}")
Expand Down

0 comments on commit 51be68b

Please sign in to comment.