Skip to content

Commit

Permalink
add tests document in README
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Feb 18, 2024
1 parent 563afbb commit 0dcfd3b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
14 changes: 1 addition & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,8 @@ If you have already installed **MinGW-w64** or **Visual Studio**, all you need i
```

#### Run Test
See [here](../tests/README.md) for unit tests and runtime test.

##### Visual Studio
```bash
$ cmake -B tests/build -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022" tests
$ cmake --build tests/build
$ cd tests/build ; ctest -C Debug ; cd ../..
```

##### MinGW-w64 >= GCC 11.2.0
```bash
$ cmake -B tests/build -DCMAKE_BUILD_TYPE=Debug -G "MinGW Makefiles" tests
$ cmake --build tests/build
$ cd tests/build ; ctest -C Debug ; cd ../..
```

#### Make Installer
```bash
Expand Down
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ It is also available from the command line as a command for UI operations like `
<br>

## Installation
We support a variety of installation methods.
win-vind supports a variety of installation methods.

### [Chocolatey](https://chocolatey.org/)

Expand Down Expand Up @@ -144,26 +144,41 @@ For more information on default mappings, please visit our [website](https://pit

<img src="docs/imgs/opt_in_ms_word.png" title="Option in MS Word" width=600>

## How to build

#### Debug
## Build
All you have to do is install [cmake](https://cmake.org/download/), [Visual Sudio](https://visualstudio.microsoft.com/ja/downloads/) and [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/), then do the following.

```bash
$ cmake -B build .
$ cmake -B build
$ cmake --build build
$ ./build/Debug/win-vind.exe
```

#### Release
If you want to build with MinGW or create an installer, see [here](https://github.com/pit-ray/win-vind/blob/master/CONTRIBUTING.md#to-development).

## Test
Tests can be run using ctest and python.

### Unit Test
Run source code level tests.

```bash
$ cmake -B build -DCMAKE_BUILD_TYPE=Release .
$ cmake --build build --config Release
$ ./build/Release/win-vind.exe
$ cd tests
$ cmake -B build unit
$ cmake --build build
$ ctest -C Debug --test-dir build --output-on-failure
$ cd ..
```

If you want to build with MinGW or create an installer, see [here](https://github.com/pit-ray/win-vind/blob/master/CONTRIBUTING.md#to-development).
### Runtime Test
Runtime tests check the behavior of the built binaries.

```bash
$ cd tests
$ python runtime/test.py "../bin_64/win-vind/win-vind.exe" # Specifies the binary for release.
$ cd ..
```

See [this document](tests/README.md) for details.

## Contribute
If you would like to contribute to win-vind, see [CONTRIBUTING.md](https://github.com/pit-ray/win-vind/blob/master/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It are run using CTest at compile time. This is based on branch coverage.

### Visual Studio 2019
```bash
$ cmake -B build_msvc -G "Visual Studio 16 2019" unit
$ cmake -B build_msvc -G "Visual Studio 17 2022" unit
$ cmake --build build_msvc
$ ctest -C Debug --test-dir build_msvc --output-on-failure
```
Expand Down

0 comments on commit 0dcfd3b

Please sign in to comment.