From b36e41cb7117757011e6f1ccc476ccc806219a58 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 6 Apr 2015 21:48:20 -0300 Subject: Added a PVRTC encoder for iOS --- bin/tests/test_gui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin/tests') diff --git a/bin/tests/test_gui.cpp b/bin/tests/test_gui.cpp index 17a6a4111c..70cff12c44 100644 --- a/bin/tests/test_gui.cpp +++ b/bin/tests/test_gui.cpp @@ -132,7 +132,7 @@ public: frame->add_child( button ); -#if 0 + Sprite *tf = memnew( Sprite ); frame->add_child(tf); Image img; @@ -140,14 +140,14 @@ public: img.resize(512,512); img.generate_mipmaps(); - img.compress(); - Ref text = memnew( Texture ); - text->create_from_image(img); - tf->set_texture(text); + img.compress(Image::COMPRESS_PVRTC4); + Ref tt = memnew( ImageTexture ); + tt->create_from_image(img); + tf->set_texture(tt); tf->set_pos(Point2(50,50)); //tf->set_scale(Point2(0.3,0.3)); - +#if 0 return; #endif -- cgit v1.2.3 From 22997294fa87a1346ef4617b887953a356943354 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 7 Apr 2015 21:18:46 -0300 Subject: -Concatenating arrays keeps the shared property if any of the arrays is shared. Fixes #1646 --- bin/tests/test_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/tests') diff --git a/bin/tests/test_gui.cpp b/bin/tests/test_gui.cpp index 70cff12c44..afcd89c139 100644 --- a/bin/tests/test_gui.cpp +++ b/bin/tests/test_gui.cpp @@ -132,7 +132,7 @@ public: frame->add_child( button ); - +#if 0 Sprite *tf = memnew( Sprite ); frame->add_child(tf); Image img; @@ -147,7 +147,7 @@ public: tf->set_pos(Point2(50,50)); //tf->set_scale(Point2(0.3,0.3)); -#if 0 + return; #endif -- cgit v1.2.3 From 6227058098f9d826cbb57c1403c9ae7d2b2a31d1 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 7 Apr 2015 21:48:03 -0300 Subject: added assert to disassembly, fixes #1641 --- bin/tests/test_gdscript.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin/tests') diff --git a/bin/tests/test_gdscript.cpp b/bin/tests/test_gdscript.cpp index 4b4030954a..f43828553d 100644 --- a/bin/tests/test_gdscript.cpp +++ b/bin/tests/test_gdscript.cpp @@ -478,6 +478,7 @@ static String _disassemble_addr(const Ref& p_script,const GDFunction& case GDFunction::ADDR_TYPE_NIL: { return "nil"; } break; + } return ""; @@ -828,6 +829,13 @@ static void _disassemble_class(const Ref& p_class,const Vector txt+=" end"; incr+=1; } break; + case GDFunction::OPCODE_ASSERT: { + + txt+=" assert "; + txt+=DADDR(1); + incr+=2; + + } break; } -- cgit v1.2.3 From fdaa2920eb21fff3320a17e9239e04dfadecdb00 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 18 Apr 2015 14:38:54 -0300 Subject: Updated copyright year in all headers --- bin/tests/test_containers.cpp | 2 +- bin/tests/test_containers.h | 2 +- bin/tests/test_detailer.cpp | 2 +- bin/tests/test_detailer.h | 2 +- bin/tests/test_gdscript.cpp | 2 +- bin/tests/test_gdscript.h | 2 +- bin/tests/test_gui.cpp | 2 +- bin/tests/test_gui.h | 2 +- bin/tests/test_image.cpp | 2 +- bin/tests/test_image.h | 2 +- bin/tests/test_io.cpp | 2 +- bin/tests/test_io.h | 2 +- bin/tests/test_main.cpp | 2 +- bin/tests/test_main.h | 2 +- bin/tests/test_math.cpp | 2 +- bin/tests/test_math.h | 2 +- bin/tests/test_misc.cpp | 2 +- bin/tests/test_misc.h | 2 +- bin/tests/test_particles.cpp | 2 +- bin/tests/test_particles.h | 2 +- bin/tests/test_physics.cpp | 2 +- bin/tests/test_physics.h | 2 +- bin/tests/test_physics_2d.cpp | 2 +- bin/tests/test_physics_2d.h | 2 +- bin/tests/test_python.cpp | 2 +- bin/tests/test_python.h | 2 +- bin/tests/test_render.cpp | 2 +- bin/tests/test_render.h | 2 +- bin/tests/test_shader_lang.cpp | 2 +- bin/tests/test_shader_lang.h | 2 +- bin/tests/test_sound.cpp | 2 +- bin/tests/test_sound.h | 26 +++++++++++++------------- bin/tests/test_string.cpp | 2 +- bin/tests/test_string.h | 2 +- 34 files changed, 46 insertions(+), 46 deletions(-) (limited to 'bin/tests') diff --git a/bin/tests/test_containers.cpp b/bin/tests/test_containers.cpp index d80dbd1f22..db877fcc1c 100644 --- a/bin/tests/test_containers.cpp +++ b/bin/tests/test_containers.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_containers.h b/bin/tests/test_containers.h index 7f73d132a1..3bfdef301b 100644 --- a/bin/tests/test_containers.h +++ b/bin/tests/test_containers.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_detailer.cpp b/bin/tests/test_detailer.cpp index 4cb927411a..ce318632dd 100644 --- a/bin/tests/test_detailer.cpp +++ b/bin/tests/test_detailer.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_detailer.h b/bin/tests/test_detailer.h index 49c206ee93..a410f6a67a 100644 --- a/bin/tests/test_detailer.h +++ b/bin/tests/test_detailer.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_gdscript.cpp b/bin/tests/test_gdscript.cpp index f43828553d..68209ecb54 100644 --- a/bin/tests/test_gdscript.cpp +++ b/bin/tests/test_gdscript.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_gdscript.h b/bin/tests/test_gdscript.h index 1659880c2a..f599b9c9e1 100644 --- a/bin/tests/test_gdscript.h +++ b/bin/tests/test_gdscript.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_gui.cpp b/bin/tests/test_gui.cpp index afcd89c139..8822febdeb 100644 --- a/bin/tests/test_gui.cpp +++ b/bin/tests/test_gui.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_gui.h b/bin/tests/test_gui.h index 85c334dceb..556b45462a 100644 --- a/bin/tests/test_gui.h +++ b/bin/tests/test_gui.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_image.cpp b/bin/tests/test_image.cpp index 5a25c47136..b378755dfe 100644 --- a/bin/tests/test_image.cpp +++ b/bin/tests/test_image.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_image.h b/bin/tests/test_image.h index cd6fe458d4..8812658464 100644 --- a/bin/tests/test_image.h +++ b/bin/tests/test_image.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_io.cpp b/bin/tests/test_io.cpp index b1d8188c42..4c211a1b0d 100644 --- a/bin/tests/test_io.cpp +++ b/bin/tests/test_io.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_io.h b/bin/tests/test_io.h index 9184d4bb86..27a5118cf0 100644 --- a/bin/tests/test_io.h +++ b/bin/tests/test_io.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_main.cpp b/bin/tests/test_main.cpp index 5d66f35f24..3dba347e39 100644 --- a/bin/tests/test_main.cpp +++ b/bin/tests/test_main.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_main.h b/bin/tests/test_main.h index 404e528e14..d1898387eb 100644 --- a/bin/tests/test_main.h +++ b/bin/tests/test_main.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_math.cpp b/bin/tests/test_math.cpp index ea324a7381..d340515c65 100644 --- a/bin/tests/test_math.cpp +++ b/bin/tests/test_math.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_math.h b/bin/tests/test_math.h index 7b8d154475..3209ebcef6 100644 --- a/bin/tests/test_math.h +++ b/bin/tests/test_math.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_misc.cpp b/bin/tests/test_misc.cpp index 819afc0d06..d6ea193853 100644 --- a/bin/tests/test_misc.cpp +++ b/bin/tests/test_misc.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_misc.h b/bin/tests/test_misc.h index d6310e5f38..ac751e5cc9 100644 --- a/bin/tests/test_misc.h +++ b/bin/tests/test_misc.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_particles.cpp b/bin/tests/test_particles.cpp index 2ccbb31017..18b52444d8 100644 --- a/bin/tests/test_particles.cpp +++ b/bin/tests/test_particles.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_particles.h b/bin/tests/test_particles.h index 876751a56f..e5e3cfab15 100644 --- a/bin/tests/test_particles.h +++ b/bin/tests/test_particles.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_physics.cpp b/bin/tests/test_physics.cpp index c183720617..e3fd96ff9d 100644 --- a/bin/tests/test_physics.cpp +++ b/bin/tests/test_physics.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_physics.h b/bin/tests/test_physics.h index ef4f647829..f62806bf5e 100644 --- a/bin/tests/test_physics.h +++ b/bin/tests/test_physics.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_physics_2d.cpp b/bin/tests/test_physics_2d.cpp index b2ad1d9ee8..a441bed430 100644 --- a/bin/tests/test_physics_2d.cpp +++ b/bin/tests/test_physics_2d.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_physics_2d.h b/bin/tests/test_physics_2d.h index 184c6973a8..eadd5ebcb4 100644 --- a/bin/tests/test_physics_2d.h +++ b/bin/tests/test_physics_2d.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_python.cpp b/bin/tests/test_python.cpp index 0b2bac492c..a89e4a7eee 100644 --- a/bin/tests/test_python.cpp +++ b/bin/tests/test_python.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_python.h b/bin/tests/test_python.h index 781be1c0ce..9dafbd545d 100644 --- a/bin/tests/test_python.h +++ b/bin/tests/test_python.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_render.cpp b/bin/tests/test_render.cpp index cad3658d84..ce7606dce6 100644 --- a/bin/tests/test_render.cpp +++ b/bin/tests/test_render.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_render.h b/bin/tests/test_render.h index d5d140a090..dc71a32978 100644 --- a/bin/tests/test_render.h +++ b/bin/tests/test_render.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_shader_lang.cpp b/bin/tests/test_shader_lang.cpp index 059781b64c..df826e489d 100644 --- a/bin/tests/test_shader_lang.cpp +++ b/bin/tests/test_shader_lang.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_shader_lang.h b/bin/tests/test_shader_lang.h index a12b45293d..85d379bc43 100644 --- a/bin/tests/test_shader_lang.h +++ b/bin/tests/test_shader_lang.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_sound.cpp b/bin/tests/test_sound.cpp index 40800f6fa5..63c6edd9c9 100644 --- a/bin/tests/test_sound.cpp +++ b/bin/tests/test_sound.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_sound.h b/bin/tests/test_sound.h index fd0dd7a621..32b66c8bba 100644 --- a/bin/tests/test_sound.h +++ b/bin/tests/test_sound.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -26,15 +26,15 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef TEST_SOUND_H -#define TEST_SOUND_H - -#include "os/main_loop.h" - -namespace TestSound { - -MainLoop* test(); - -} - -#endif // TEST_SOUND_H +#ifndef TEST_SOUND_H +#define TEST_SOUND_H + +#include "os/main_loop.h" + +namespace TestSound { + +MainLoop* test(); + +} + +#endif // TEST_SOUND_H diff --git a/bin/tests/test_string.cpp b/bin/tests/test_string.cpp index 2a048f2f67..3c8d0f7d86 100644 --- a/bin/tests/test_string.cpp +++ b/bin/tests/test_string.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/bin/tests/test_string.h b/bin/tests/test_string.h index 31cef60014..b04eccb005 100644 --- a/bin/tests/test_string.h +++ b/bin/tests/test_string.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3 From 59154cccf9fcf814a21a2596993fb1b6777d3bb7 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 20 Apr 2015 19:38:02 -0300 Subject: -Changed Godot exit to be clean. -Added more debug information on memory cleanliness on exit (if run with -v) -Fixed several memory leaks, fixes #1731, fixes #755 --- bin/tests/test_render.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bin/tests') diff --git a/bin/tests/test_render.cpp b/bin/tests/test_render.cpp index ce7606dce6..97a52b16c1 100644 --- a/bin/tests/test_render.cpp +++ b/bin/tests/test_render.cpp @@ -33,6 +33,8 @@ #include "print_string.h" #include "os/os.h" #include "quick_hull.h" +#include "os/keyboard.h" + #define OBJECT_COUNT 50 namespace TestRender { @@ -59,10 +61,14 @@ class TestMainLoop : public MainLoop { float ofs; bool quit; +protected: + + public: virtual void input_event(const InputEvent& p_event) { - + if (p_event.type==InputEvent::KEY && p_event.key.pressed) + quit=true; } virtual void init() { -- cgit v1.2.3 From 4804462ee06c1b3e2d1b50b857ce8693d3c0936d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 1 May 2015 10:44:08 -0300 Subject: -Fixes from source code analyzizer, closes #1768 --- bin/tests/test_physics_2d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/tests') diff --git a/bin/tests/test_physics_2d.cpp b/bin/tests/test_physics_2d.cpp index a441bed430..70a7d868be 100644 --- a/bin/tests/test_physics_2d.cpp +++ b/bin/tests/test_physics_2d.cpp @@ -191,7 +191,7 @@ class TestPhysics2DMainLoop : public MainLoop { Image image(convex_png); - body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image=vs->texture_create_from_image(image); + body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].image=vs->texture_create_from_image(image); RID convex_polygon_shape = ps->shape_create(Physics2DServer::SHAPE_CONVEX_POLYGON); @@ -206,7 +206,7 @@ class TestPhysics2DMainLoop : public MainLoop { arr.push_back(Point2(11,7)-sb); ps->shape_set_data(convex_polygon_shape,arr); - body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].shape = convex_polygon_shape; + body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].shape = convex_polygon_shape; } -- cgit v1.2.3 From 8228fea02feabbfdd4def950e67f9ea6507d981d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 14 Jun 2015 02:13:47 -0300 Subject: missing changes --- bin/tests/test_gui.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin/tests') diff --git a/bin/tests/test_gui.cpp b/bin/tests/test_gui.cpp index 8822febdeb..c404623872 100644 --- a/bin/tests/test_gui.cpp +++ b/bin/tests/test_gui.cpp @@ -109,6 +109,9 @@ public: frame->set_anchor( MARGIN_RIGHT, Control::ANCHOR_END ); frame->set_anchor( MARGIN_BOTTOM, Control::ANCHOR_END ); frame->set_end( Point2(0,0) ); + + Ref t = memnew( Theme ); + frame->set_theme(t); get_root()->add_child( frame ); -- cgit v1.2.3 From ef005d4f64d2ee2b35185d4fbdf2aea684cd4966 Mon Sep 17 00:00:00 2001 From: Lee Zher Huei Date: Fri, 24 Jul 2015 01:18:46 +0100 Subject: Regex library Nrex initial port --- bin/tests/test_string.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'bin/tests') diff --git a/bin/tests/test_string.cpp b/bin/tests/test_string.cpp index 3c8d0f7d86..7b512a5d99 100644 --- a/bin/tests/test_string.cpp +++ b/bin/tests/test_string.cpp @@ -31,7 +31,7 @@ //#include "math_funcs.h" #include #include "os/os.h" -#include "drivers/trex/regex.h" +#include "drivers/nrex/regex.h" #include "test_string.h" @@ -463,20 +463,16 @@ bool test_26() { OS::get_singleton()->print("\n\nTest 26: RegEx\n"); RegEx regexp("(.*):(.*)"); - List captures; - bool match = regexp.match("name:password", &captures); - printf("\tmatch: %s\n", match?"true":"false"); + bool res = regexp.match("name:password"); + printf("\tmatch: %s\n", res?"true":"false"); - printf("\t%i captures:\n", captures.size()); - List::Element *I = captures.front(); - while (I) { - - printf("%ls\n", I->get().c_str()); - - I = I->next(); - }; - return captures.size(); + printf("\t%i captures:\n", regexp.get_capture_count()); + for (int i = 0; i Date: Fri, 24 Jul 2015 14:09:39 +0100 Subject: Made RegEx API similar to old version --- bin/tests/test_string.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/tests') diff --git a/bin/tests/test_string.cpp b/bin/tests/test_string.cpp index 7b512a5d99..93b1835b78 100644 --- a/bin/tests/test_string.cpp +++ b/bin/tests/test_string.cpp @@ -464,8 +464,8 @@ bool test_26() { OS::get_singleton()->print("\n\nTest 26: RegEx\n"); RegEx regexp("(.*):(.*)"); - bool res = regexp.match("name:password"); - printf("\tmatch: %s\n", res?"true":"false"); + int res = regexp.find("name:password"); + printf("\tmatch: %s\n", (res>=0)?"true":"false"); printf("\t%i captures:\n", regexp.get_capture_count()); for (int i = 0; i