Skip to content

Commit da7a472

Browse files
committed
Fix tests
1 parent 340117f commit da7a472

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

include/Image.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,6 @@ class Image : public ::Image {
267267
return *this;
268268
}
269269

270-
/**
271-
* Apply alpha mask to image
272-
*/
273-
inline Image& AlphaMask(const ::Image& alphaMask) {
274-
::ImageAlphaMask(this, alphaMask);
275-
return *this;
276-
}
277-
278270
/**
279271
* Crop image depending on alpha value
280272
*/
@@ -294,7 +286,7 @@ class Image : public ::Image {
294286
/**
295287
* Apply alpha mask to image
296288
*/
297-
inline Image& AlphaMask(::Color color, const ::Image& alphaMask) {
289+
inline Image& AlphaMask(const ::Image& alphaMask) {
298290
::ImageAlphaMask(this, alphaMask);
299291
return *this;
300292
}

include/Texture.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ class Texture : public ::Texture {
260260
*/
261261
inline Texture& SetShapes(const ::Rectangle& source) {
262262
::SetShapesTexture(*this, source);
263+
return *this;
263264
}
264265

265266
private:

tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ target_link_libraries(raylib_test raylib-cpp raylib)
1414

1515
# Test
1616
add_test(NAME raylib_test COMMAND raylib_test)
17+
18+
# Copy all the resources
19+
file(COPY resources/ DESTINATION "resources/")

tests/raylib_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ int main() {
2626
// Math
2727
raylib::Vector2 direction(50, 50);
2828
raylib::Vector2 newDirection = direction.Rotate(30);
29-
assert((int)newDirection.x == 18);
29+
std::cout << "Out: " << newDirection.x << std::endl;
30+
assert((int)newDirection.x == 57);
3031

3132
// raylib::GetDirectoryFiles()
3233
std::vector<std::string> files = raylib::GetDirectoryFiles(::GetWorkingDirectory());

0 commit comments

Comments
 (0)