summaryrefslogtreecommitdiff
path: root/main/tests
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-01-14 12:26:56 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-01-14 14:52:23 +0100
commit93ab45b6b5c4f8e0619e963156c983009d399a9d (patch)
tree80e55993f29ad7bf502ef7388eef78114b2dc4ab /main/tests
parent78e90ac60b81f17fdf8c319357f16962e92e6106 (diff)
Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/test_containers.cpp3
-rw-r--r--main/tests/test_gui.cpp2
-rw-r--r--main/tests/test_math.cpp2
-rw-r--r--main/tests/test_physics.cpp4
-rw-r--r--main/tests/test_physics_2d.cpp20
-rw-r--r--main/tests/test_render.cpp6
-rw-r--r--main/tests/test_string.cpp2
7 files changed, 19 insertions, 20 deletions
diff --git a/main/tests/test_containers.cpp b/main/tests/test_containers.cpp
index 4bc297d0ba..2711d107e4 100644
--- a/main/tests/test_containers.cpp
+++ b/main/tests/test_containers.cpp
@@ -55,7 +55,6 @@ MainLoop * test() {
{
-// static const int size = 16;
Image img;
img.create(default_mouse_cursor_xpm);
@@ -78,7 +77,7 @@ MainLoop * test() {
for (int i=0;i<1100;i++) {
int num=i;//(int)Math::random(0,1024);
- // print_line("inserting "+itos(num));
+ //print_line("inserting "+itos(num));
set.insert( num );
}
diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp
index da0ff5d1ca..b0ebc20180 100644
--- a/main/tests/test_gui.cpp
+++ b/main/tests/test_gui.cpp
@@ -97,7 +97,7 @@ public:
Sprite *sp = memnew( Sprite );
sp->set_texture( vp->get_render_target_texture() );
-// sp->set_texture( ResourceLoader::load("res://ball.png") );
+ //sp->set_texture( ResourceLoader::load("res://ball.png") );
sp->set_pos(Point2(300,300));
get_root()->add_child(sp);
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index f3d9ddba87..89513b81d9 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -596,7 +596,7 @@ MainLoop* test() {
{
- // print_line("NUM: "+itos(237641278346127));
+ //print_line("NUM: "+itos(237641278346127));
print_line("NUM: "+itos(-128));
return NULL;
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index ea5b1cae85..ea98da34ca 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -358,9 +358,9 @@ public:
gxf.basis.scale(Vector3(1.4,0.4,1.4));
gxf.origin=Vector3(-2,1,-2);
make_grid(5,5,2.5,1,gxf);
- // create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,gxf);
+ //create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,gxf);
//create_static_plane( Plane( Vector3(0,1,0), -2) );
-// test_joint();
+ //test_joint();
test_fall();
//test_joint();
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 2074d532b1..8a6a8c78f9 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -218,8 +218,10 @@ class TestPhysics2DMainLoop : public MainLoop {
void _do_ray_query() {
-// Physics2DServer *ps = Physics2DServer::get_singleton();
- // ps->query_intersection_segment(ray_query,ray_from,ray_to);
+ /*
+ Physics2DServer *ps = Physics2DServer::get_singleton();
+ ps->query_intersection_segment(ray_query,ray_from,ray_to);
+ */
}
@@ -273,7 +275,7 @@ protected:
ps->body_set_continuous_collision_detection_mode(body,Physics2DServer::CCD_MODE_CAST_SHAPE);
ps->body_set_state(body,Physics2DServer::BODY_STATE_TRANSFORM,p_xform);
-// print_line("add body with xform: "+p_xform);
+ //print_line("add body with xform: "+p_xform);
RID sprite = vs->canvas_item_create();
vs->canvas_item_set_parent(sprite,canvas);
vs->canvas_item_set_transform(sprite,p_xform);
@@ -281,8 +283,8 @@ protected:
vs->canvas_item_add_texture_rect(sprite,Rect2(-imgsize/2.0,imgsize),body_shape_data[p_shape].image);
ps->body_set_force_integration_callback(body,this,"_body_moved",sprite);
-// RID q = ps->query_create(this,"_body_moved",sprite);
-// ps->query_body_state(q,body);
+ //RID q = ps->query_create(this,"_body_moved",sprite);
+ //ps->query_body_state(q,body);
return body;
}
@@ -409,10 +411,12 @@ public:
};
Physics2DServer::ShapeType type = types[i%4];
-// type=Physics2DServer::SHAPE_SEGMENT;
+ //type=Physics2DServer::SHAPE_SEGMENT;
_add_body(type,Transform2D(i*0.8,Point2(152+i*40,100-40*i)));
- //if (i==0)
- // ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC);
+ /*
+ if (i==0)
+ ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC);
+ */
}
//RID b= _add_body(Physics2DServer::SHAPE_CIRCLE,Transform2D(0,Point2(101,140)));
diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp
index 3049ba7d45..7380c1ff6a 100644
--- a/main/tests/test_render.cpp
+++ b/main/tests/test_render.cpp
@@ -192,7 +192,6 @@ public:
*/
RID lightaux;
- //*
lightaux = vs->light_create( VisualServer::LIGHT_DIRECTIONAL );
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,0.0) );
vs->light_set_color( lightaux, Color(1.0,1.0,1.0) );
@@ -203,17 +202,14 @@ public:
lla.set_look_at(Vector3(),Vector3(-0.000000,-0.836026,-0.548690),Vector3(0,1,0));
vs->instance_set_transform( light, lla );
- // */
- //*
lightaux = vs->light_create( VisualServer::LIGHT_OMNI );
-// vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,1.0) );
+ //vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,1.0) );
vs->light_set_color( lightaux, Color(1.0,1.0,0.0) );
vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_RANGE, 4 );
vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_ENERGY, 8 );
//vs->light_set_shadow( lightaux, true );
//light = vs->instance_create( lightaux );
- // */
ofs=0;
quit=false;
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index d99ad4476f..a4a8ceb072 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -252,7 +252,7 @@ bool test_13() {
/* how can i embed UTF in here? */
static const CharType ustr[] = { 0x304A , 0x360F, 0x3088, 0x3046, 0 };
-// static const wchar_t ustr[] = { 'P', 0xCE, 'p',0xD3, 0 };
+ //static const wchar_t ustr[] = { 'P', 0xCE, 'p',0xD3, 0 };
String s=ustr;
OS::get_singleton()->print("\tUnicode: %ls\n",ustr);