Commit graph

249 commits

Author SHA1 Message Date
JunsuChoi
80cc0177fb test capiSwCanvas: remove a invalid test case.
This test depends on the machine environment.
it's not guaranteed the same result so we remove it.
2021-11-22 13:29:07 +09:00
Hermet Park
4587a39f46 test capi: fix the memory leak.
target is dangled without any proper deletion...
2021-11-09 15:05:55 +09:00
Hermet Park
de353401a7 Revert "test capi: fix memory leak."
This reverts commit 651a98a2d8.

Applied the alternative solution instead of this patch.
37e39866dd
2021-11-09 14:55:54 +09:00
Hermet Park
74413a989f common paint: fix a memory leak.
delete dangling object properly in the corner case.

Unfortunately, this brings to correct the capi test cases.
we assume the paints is deleted whenever its result is successful or not.

@Issue: https://github.com/Samsung/thorvg/issues/995
2021-11-09 14:51:32 +09:00
Hermet Park
775a0bcb1d test initializer: remove a invalid test case.
This test depends on the machine environment.
it's not guaranteed the same result so we remove it.
2021-11-09 14:28:41 +09:00
JunsuChoi
00bba39b02 test Array: Remove too big size test
On large memory machines, if machine have enough memory,
tests failed because it doesn't return null.
2021-11-09 14:04:42 +09:00
Mira Grudzinska
8608238343 tests: capi - buffer was not freed 2021-11-08 12:27:23 +09:00
Hermet Park
651a98a2d8 test capi: fix memory leak.
Delete the paint which is not committed properly.
2021-11-06 01:46:42 +01:00
Hermet Park
fd74e0fae8 test: fix memory leak.
these duplicates are not unique_ptr, should be taken care.

@Issue: https://github.com/Samsung/thorvg/issues/995
2021-11-05 21:48:24 +09:00
Hermet Park
c3a29bd648 common math: code refactoring
introduce common math functions to improve the reusability.
2021-11-04 17:11:27 +09:00
JunsuChoi
021b86a065 test Picture: Fix array release
fix code
2021-11-01 15:04:05 +09:00
JunsuChoi
f28a0d9b5c test Scene/Canvas: Fix maximum size for big size test
In some development environments, -1 of uint32_t may become 0.
2021-10-28 14:24:20 +09:00
JunsuChoi
5fd60e14a2 test Picture : Remove unnecessary namespace
Remove `std::`
2021-10-28 13:59:24 +09:00
JunsuChoi
a7f7cbd29a test Picture: Change file open of ifstream to binary(and readonly) type
When opening a file using ifstream, a different problem occurs for each platform.
To fix this, change to binary, readonly type.

refer to:
https://stackoverflow.com/questions/9817806/why-does-my-program-produce-different-results-on-windows-and-linux-about-file-r
2021-10-28 13:59:24 +09:00
Mira Grudzinska
2780d77a52 capi: tvg_paint_transform -> tvg_paint_set_transform 2021-10-26 19:20:15 +09:00
Mira Grudzinska
1006cbd0d8 tests: added Capis gradient transformation tests 2021-10-25 19:35:00 +09:00
Mira Grudzinska
cc9b5669e5 tests: fill transformation tests added 2021-10-22 19:47:29 +09:00
Hermet Park
8cc7f50235 test: API coverage up
Added identifier() test cases.
2021-10-22 18:47:05 +09:00
Mira Grudzinska
78b7b278c0 tests: saver capis added into the tests 2021-10-13 21:25:44 +09:00
Mira Grudzinska
e6debdbf15
capi: tvg_swcanvas_set_mempool capi added (#903)
* capi: tvg_swcanvas_set_mempool capi added

* tests: tvg_swcanvas_set_mempool added to the tests
2021-10-13 19:31:39 +09:00
Mira Grudzinska
a4d2a99c03 tests: tvg_gradient_duplicate added to the capi tests 2021-10-13 18:34:02 +09:00
projectitis
dad6c71b6c
all: fix warnings on MSVC
* Explicit casts to suppress warnings
* Fixed compiler warnings
2021-10-09 11:33:45 +09:00
Hermet Park
b97f9338dd test: ++safety.
add null handlings just in case.
2021-10-07 15:04:46 +09:00
Mira Grudzinska
304a351dcc tests: added tests for size and composite C apis 2021-10-07 15:03:28 +09:00
projectitis
a678846068
tests: fix stack overflow error in testPicture for windows 2021-10-07 14:51:07 +09:00
Hermet Park
9737dd4a89 test capi: update tvg_paint_get_bounds() utc.
The api has been changed by 060564cc93
update it according its change.
2021-10-06 22:17:18 +09:00
Mira Grudzinska
d67517337c tests: ++LOC svg loader, tvg saver 2021-10-06 11:11:21 +09:00
Projectitis
591ea1d61c Changes to support MSVC 2021-09-29 22:56:52 +09:00
bchrescionko
f41cef44c1
test: creating test for downscaling picture (#837)
Added tests for the functions rastering scaled down images
2021-09-24 15:19:02 +02:00
bchrescionko
a50ccbb0c6
test: added test for tvg_picture_get_viewbox function 2021-09-24 21:08:59 +09:00
Hermet Park
79933d9efa api: set default value nullptr for user convenience. 2021-09-09 12:40:43 +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
Mira Grudzinska
5c504cbfe6
test SwEngine: increasing lines coverage (#767)
All functions from tvgSwStroke.cpp called.
2021-09-02 15:04:44 +02:00
Mira Grudzinska
dddb38d900 test SwEngine: _rasterTranslucentRect added into the tests 2021-09-01 17:26:07 +09:00
Mira Grudzinska
2fb07d9ac8 test SwEngine: raster image functions included into the unit tests
All image rastering funcions called in the 'Image Draw' test case.
2021-09-01 17:25:42 +09:00
Michal Maciola
8ed6a1a12d utc: increase coverage of picture and fill 2021-08-20 12:36:09 +09:00
Michal Maciola
f66ea21e9c utc: increase coverage SwEngine 2021-08-20 12:35:25 +09:00
Michal Maciola
d82b088b7a utc: increase coverage up #1 2021-08-19 14:49:14 +09:00
Michal Maciola
3a05ae4c01 utc: increase coverage up 2021-08-19 14:49:14 +09:00
Michal Maciola
cff8815404
loaders: Pass mimetype to picture::load
* loaders: Pass mimetype to picture::load

Added mimetype attribute to enfaster loading using a proper loader.

@Changed api: Picture::load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false)
@issue: #571
2021-08-05 11:02:26 +09:00
Hermet Park
5e52134e2a dexample Picture: improve the test coverage.
In this patch, it replaced the test images with Lenna.
and fix the wrong jpeg file size figuring.
2021-07-30 12:09:59 +09:00
Hermet Park
f7f241cff5 common picture: remove viewbox() api.
picture provides size() interface to return the image size,
viewbox() is conceptually not correct with the Picture.

Remove it under the beta api.
2021-07-28 13:07:43 +09:00
Hermet Park
b3b9d8edf6 test paint: add missing Paint utc 2021-07-27 10:21:09 +09:00
Hermet Park
94eeb92dbe infra: seprate test image resources from the examples.
change for removing dependency.
2021-07-19 14:43:26 +09:00
Michal Maciola
f9d5c8b42d test: testPicture added .jpg and .png loading tests 2021-07-16 00:36:38 +09:00
Michal Maciola
58ad09a07a
test capi: added missing canvas, paint and shape tests
Added tests for tvg_canvas_reserve, tvg_canvas_update_paint, tvg_paint_duplicate, tvg_paint_set_composite_method, tvg_shape_cubic_to, tvg_shape_close
2021-07-16 00:34:54 +09:00
Michal Maciola
9bfacf2256
test capi: Stroke Radial Gradient
Added tvg_shape_get_gradient
2021-07-16 00:32:41 +09:00
Michal Maciola
c3aef76278 test: render jpg and png files 2021-07-16 00:29:39 +09:00
Michal Maciola
ba1a38ed39 test capi: Stroke Linear Gradient fix #2 2021-07-15 16:06:11 +09:00
Michal Maciola
a757e6b97d test capi: Stroke Linear Gradient fix #1
Added tvg_shape_get_gradient
2021-07-15 16:06:11 +09:00