From 5380ffe1617bb35d99cac86b26495093323f398d Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Wed, 14 Jan 2026 21:36:40 +0100 Subject: feat: add readme, license --- LICENSE | 21 +++++++++++++++++++++ README.md | 33 +++++++++++++++++++++++++++++++++ ls_test.h | 4 +++- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..00d317e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Lion Kortlepel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b9c5933 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# LS Test Harness + +Minimal, single-header unit test framework for C. + +- Auto-registers test functions. +- Header-only. +- Macros: `ASSERT_EQ`, `ASSERT`, etc. +- ANSI C with minimal extensions. + +## Quick Start + +1. Copy `ls_test.h` to your project. +2. In one C file: + ```c + #define LS_TEST_IMPLEMENTATION + #include "ls_test.h" + ``` +3. Write tests: + ```c + TEST_CASE(my_test) { + ASSERT_EQ(add(1,2), 3, "%d"); + return 0; + } + ``` +4. Add main: + ```c + TEST_MAIN + ``` +5. Compile and run. + +## License + +MIT. diff --git a/ls_test.h b/ls_test.h index 8453949..4250ec7 100644 --- a/ls_test.h +++ b/ls_test.h @@ -48,7 +48,9 @@ * This file is provided under the MIT license. For commercial support and * maintenance, feel free to use the e-mail below to contact the author(s). * - * Copyright © 2026 Lion Kortlepel + * The MIT License (MIT) + * + * Copyright (c) 2026 Lion Kortlepel * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the “Software”), to deal -- cgit