Commit graph

34 commits

Author SHA1 Message Date
Mira Grudzinska
b5d81be339 tests: remove capi tests
@Issue: https://github.com/thorvg/thorvg/issues/2978
2024-11-21 23:39:17 +09:00
SergeyLebedkin
4b6f2172be wg_engineL fix test build scripts and ambiguous declarations
Issue https://github.com/thorvg/thorvg/issues/2938
2024-11-12 22:49:17 +09:00
Elliott Sales de Andrade
5f08b9ade4 build: Remove redundant comparisons
If a Meson option is typed as `boolean`, the `get_option` returns a
boolean, and comparing it with `true` is redundant. Meson also errors if
you try to compare across types, so it couldn't _not_ be a boolean.

Also, Meson is not C, so no need for parentheses around `if` conditions.
2024-08-19 17:42:40 +09:00
Hermet Park
de75c58b89 test: clean up test suites
Merge two separate units: SwCanvas and SwCanvasBase.
2024-05-18 18:10:50 +09:00
Hermet Park
b0f258d531 test: improve the test-coverage.
make the lottie/text coverage up.

issue: https://github.com/thorvg/thorvg/issues/2067
2024-04-05 16:51:22 +09:00
Jinny You
5695f84307 test: Added test code for the lottie slot
This patch adds the test case for the recently introduced lottie slot API.

@Issues: https://github.com/thorvg/thorvg/issues/2029
2024-03-06 19:51:57 +09:00
Hermet Park
c7123a1547 test: enhanced the unit-test coverage
supplements animation/lottie/sw_engine test cases.

updated the page: https://github.com/thorvg/thorvg/wiki/Unit-Tests

Issue: https://github.com/thorvg/thorvg/issues/1669
2023-09-26 10:48:33 +09:00
Vincent Torri
be2de28312 portability: fix usage of TVG_API
Rule of thumb on Windows:
  * for a DLL:
    * if the library is built, set TVG_API to __declspec(dllexport)
    * if the library is used, set TVG_API to __declspec(dllimport)
  * for a static library, set TVG_API to nothing

To set TVG_API for a static library, TVG_STATIC is defined when the stataic library is built.
Otherwise, TVG_API is correctly set for a DLL.
Also sun and intel compilers are handled

@issue: https://github.com/thorvg/thorvg/issues/1446
2023-05-16 18:55:33 +09:00
Hermet Park
69063d2405 infra: specify TVG_API for both static/dynamic linking.
The previous meson script was incomplete,
therefore this change requires it to be revised.

To enable static linking use the next meson option.
"-Ddefault_library=static"

Issue: https://github.com/thorvg/thorvg/issues/1234
2023-04-22 18:32:22 +09:00
Hermet Park
d78744bae3 test accessor: added accessor test unit test.
@Issue: https://github.com/Samsung/thorvg/issues/1243
2022-12-08 22:39:09 +09:00
Michal Maciola
3ded3e359d utc: testing loading and saving .tvg
Added tests of loading and saving .tvg.
Created testSavers.cpp. Created files tag.tvg and test.tvg. Minor change
in tag.svg.
2021-09-03 11:02:25 +09:00
Michal Maciola
f66ea21e9c utc: increase coverage SwEngine 2021-08-20 12:35:25 +09:00
Hermet Park
b3b9d8edf6 test paint: add missing Paint utc 2021-07-27 10:21:09 +09:00
Hermet Park
547920d324 test filling: add fill/linear/radial gradients. 2021-07-04 01:44:34 +09:00
Hermet Park
10f80fa832 test Picture: add Picture unit tests 2021-07-02 14:02:09 +09:00
Hermet Park
27cac72d7d
test Shape: add Shape unit tests 2021-07-02 10:38:28 +09:00
JunsuChoi
b2020a9387 test Scene: Add tvg::Scene unit tests
- Creation
- Push
- Reserve
- Clear
2021-06-18 15:45:36 +09:00
JunsuChoi
d92a2c25f6 infra CI: Upload unit test result to artifact
Users can download the unit test result list from PR-> Checks -> Build Test -> Artifacts.
2021-06-17 21:50:13 +09:00
Hermet Park
20c68e3b37 test capi: code refactoring.
keep the coding consistency, no logical changes.

Also, renamed tests to avoid conflicts duplicated names.
2021-06-17 14:57:06 +09:00
Michal Szczecinski
bde0d8e751 utc capi: Added linear gradient tests. 2021-06-17 14:47:35 +09:00
Hermet Park
25b31d9154 test capi: code refactoring.
keep the coding consistency, no logical changes.
2021-06-17 14:38:27 +09:00
Michal Szczecinski
2b78d58c23 utc capi: Added radial gradient tests. 2021-06-17 14:07:11 +09:00
mmaciola
3f1b08f050
utc capi: Added capi initializer, canvas, paint and shape utc 2021-06-16 12:16:59 +09:00
Hermet Park
90dd1b5f98 tests capi: revise the show-case & infrastructure. 2021-06-12 02:11:01 +09:00
Michal Szczecinski
5b99bc186d utc capi: Added shape fill utc. 2021-06-11 23:42:03 +09:00
Hermet Park
52d95dcb59
tests: add SwCanvasBase unit tests 2021-06-11 15:14:35 +09:00
Hermet Park
5c26014e2f tests: add SwCanvas unit tests 2021-06-08 17:20:23 +09:00
Hermet Park
f0598a7481 Revert "tests: add SwCanvas base part unit tests"
This reverts commit ce6348a504.

This isn't intended pushing...
2021-06-07 20:09:02 +09:00
Hermet Park
ce6348a504 tests: add SwCanvas base part unit tests 2021-06-07 19:57:52 +09:00
Hermet Park
6b7aa8ad9e
tests: introduce catch2 unit tests infrastructure.
Catch2 is a multi-paradigm test framework for C++.
It is primarily distributed as a single header file,
very easy and simple to adopt this to thorvg project.

This patch introduces catch2 infrastsructure and one prototype as a sample.

You can refer "testInitializer.cpp", how to add unit test!
while ignoring else files such as "catch2.hpp", "testMain.cpp"

Also, enable Unit-tests with meson option when you change any thorvg code.

$meson build -Dtests=true.

launch tvgUnitTest in the build result then verify 100% coverage
before submitting any patches.
2021-06-04 16:46:34 +09:00
Hermet Park
bbfbe95ecc test: remove gtest & its infra.
thorvg is going to use catch2 framework, this is a cleanup work
before introducing catch2 utc.

See Catch2:
https://github.com/catchorg/Catch2/tree/v2.x
2021-06-03 17:38:07 +09:00
JunsuChoi
e5f59b53a4 infra CI: Introduce new build test with github action
This is a build checker using the github action.
When a pull request occurs this action does a basic build,
example build, build with test.
2021-02-19 12:59:35 +09:00
JunsuChoi
1bdf1c72a4 common Test: Add Paint.bounds unit test 2020-11-30 15:36:36 +09:00
JunsuChoi
9859a48714 test Canvas: Set up unit test based on gtest.
In test directory, set up unit_test based on gtest
First, add a test for SwCanvas generate.
2020-11-02 14:15:50 +09:00