summaryrefslogtreecommitdiff
path: root/main/tests
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-05-17 07:36:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-05-17 07:37:45 -0300
commit98a329670227c726a5d7a196e5cba8dbdd54301b (patch)
tree7346f7a3e38eb35b784ac1a68a227d07cc8881b4 /main/tests
parentd801ff2b3db2de105c1b36a74ce116e360143d4e (diff)
Removal of Image from Variant, converted to a Resource.
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/test_containers.cpp12
-rw-r--r--main/tests/test_image.cpp5
-rw-r--r--main/tests/test_physics_2d.cpp10
3 files changed, 5 insertions, 22 deletions
diff --git a/main/tests/test_containers.cpp b/main/tests/test_containers.cpp
index 890599385a..956be5d169 100644
--- a/main/tests/test_containers.cpp
+++ b/main/tests/test_containers.cpp
@@ -55,18 +55,6 @@ MainLoop *test() {
{
- Image img;
- img.create(default_mouse_cursor_xpm);
-
- {
- for (int i = 0; i < 8; i++) {
-
- Image mipmap;
- //img.make_mipmap(mipmap);
- img = mipmap;
- if (img.get_width() <= 4) break;
- };
- };
};
#if 0
diff --git a/main/tests/test_image.cpp b/main/tests/test_image.cpp
index aff3bae417..c2c742e75d 100644
--- a/main/tests/test_image.cpp
+++ b/main/tests/test_image.cpp
@@ -63,11 +63,6 @@ public:
MainLoop *test() {
- Image img;
- ImageLoader::load_image("as1.png", &img);
-
- img.resize(512, 512);
-
return memnew(TestMainLoop);
}
}
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 1476e45fcc..d8a00a589a 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -82,7 +82,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 2, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 2, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_SEGMENT].image = vs->texture_create_from_image(image);
@@ -109,7 +109,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 32, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_CIRCLE].image = vs->texture_create_from_image(image);
@@ -136,7 +136,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 32, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_RECTANGLE].image = vs->texture_create_from_image(image);
@@ -164,7 +164,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 64, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 64, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_CAPSULE].image = vs->texture_create_from_image(image);
@@ -178,7 +178,7 @@ class TestPhysics2DMainLoop : public MainLoop {
{
- Image image(convex_png);
+ Ref<Image> image = memnew(Image(convex_png));
body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image = vs->texture_create_from_image(image);