Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iswenzz/gscunit
gscunit is a unit testing library for GSC.
https://github.com/iswenzz/gscunit
cod4 gsc gsclib typescript unit-testing
Last synced: 3 months ago
JSON representation
gscunit is a unit testing library for GSC.
- Host: GitHub
- URL: https://github.com/iswenzz/gscunit
- Owner: Iswenzz
- License: gpl-3.0
- Created: 2022-04-17T23:34:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-22T20:46:05.000Z (5 months ago)
- Last Synced: 2024-11-16T06:13:39.119Z (3 months ago)
- Topics: cod4, gsc, gsclib, typescript, unit-testing
- Language: GSC
- Homepage: https://iswenzz.com
- Size: 14.1 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# gscunit
[](https://www.codefactor.io/repository/github/iswenzz/gscunit)
[](https://github.com/Iswenzz/gscunit/blob/master/LICENSE)
A testing library for GSC, as well as a CLI to run CoD4 binary and run unit tests.
## Instructions
Install [gsclib](https://github.com/Iswenzz/gsclib) and it's pre-requisites and copy the libs directory to your mod folder.## Command Line Interface
The CLI can be installed with [NPM](https://www.npmjs.com/).
```
npm install -g gscunit
```
```
Options:
--version Show version number [boolean]
-l, --location The CoD4 path location [string]
-t, --target The CoD4 binary target name [string]
-a, --args The CoD4 arguments [string]
-p, --profile The gscunit profile path [string]
--help Show help [boolean]
```## Example
```c
#include libs\gscunit\_main;
#include libs\gscunit\_utils;runTests()
{
gscunitEnv();suite("Example");
it(::test_HelloWorld, "HelloWorld");summarize(true);
}test_HelloWorld()
{
EXPECT_EQ(1 + 1, 2);
}
```
More advanced examples on the [gsclib](https://github.com/Iswenzz/gsclib/tree/master/libs/gsclib/__test__) library.## Profile
gscunit settings can be set with a profile file (.ini)
```ini
[CLI]
location=
target=
args=
```## [Download](https://github.com/Iswenzz/gscunit/releases)
## Contributors:
***Note:*** If you would like to contribute to this repository, feel free to send a pull request, and I will review your code. Also feel free to post about any problems that may arise in the issues section of the repository.