Commit Graph

35 Commits

Author SHA1 Message Date
minggo fa7c97171b fix some warnings 2013-12-06 16:32:06 +08:00
James Chen 8aef092005 issue #2790: TestCpp with new Vector<>. 2013-12-04 16:01:54 +08:00
boyu0 fb04c9e574 issue #2770: fix some warning 2013-11-13 11:22:34 +08:00
minggo 1664d3503d add PerformanceAllocTest.cpp/h to vs project and fix some compiling errors 2013-09-06 12:51:37 +08:00
Ricardo Quesada be0c8cb1e8 adds two more perf tests
Node::addChild and Node::removeChild
2013-08-31 17:08:51 -07:00
Ricardo Quesada 0d96a0ce40 resets random seed before each test 2013-08-31 15:49:25 -07:00
Ricardo Quesada a5e0febc3e Adds better names to test
And new values for get(),add(),remove(),sort(),reorder()
2013-08-31 07:27:56 -07:00
Ricardo Quesada 5abb57e5f2 AddChild test fix
`sortAllChildren` should not be part of the test.
It is tested separatedly on another test
2013-08-31 06:59:44 -07:00
Ricardo Quesada c04409b6d5 More accurate test
Name is recalculated. No time is "wasted" in calculating it.

And `Visit` test uses `Node` objects instead of `Sprite`s. So `draw` is not taken into account, just the visit.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 18:32:45 -07:00
Ricardo Quesada 7fb56bd123 Adds "Visit Scene Graph" tests
A new tests to measure the performance of visit

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 12:39:57 -07:00
Ricardo Quesada ea8eb601af Uses std::sort()
Uses std::sort() for inserting the nodes.

This code is not final, but preliminary results show that std::sort() is 60% faster

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-24 10:56:07 -07:00
Ricardo Quesada 364288cf66 Adds "Sort all Children" perf test
Adds a new perf tests: "sortAllChildren"

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-23 13:14:57 -07:00
Ricardo Quesada 055c566bc9 Adds missing #include 2013-08-22 19:30:20 -07:00
Ricardo Quesada 38bfadf7f3 Adds 2 new performance tests
Invocation with `for_each()` and using `arrayMakeObjectsPerformSelector`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-22 18:21:52 -07:00
Ricardo Quesada d7590affda Merge branch 'develop' into dictionary_array_fixes
Conflicts:
	cocos2dx/cocoa/CCArray.cpp
	cocos2dx/cocoa/CCArray.h
	cocos2dx/label_nodes/CCLabel.cpp
	extensions/CCArmature/datas/CCDatas.cpp
	extensions/CCArmature/display/CCDisplayManager.cpp
2013-08-21 21:27:44 -07:00
Ricardo Quesada f0a2f6cbf8 purge profiler data one + or - is pressed
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:02:50 -07:00
minggo 2de8963a0a fix warnings caused by deprecating some functions of Array 2013-08-22 10:45:47 +08:00
Ricardo Quesada cf02cb4581 Fixes names in Performance Node tests
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 18:05:35 -07:00
Ricardo Quesada e5551b2872 Compiles both with std::vector and ccCArray
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 16:06:51 -07:00
Ricardo Quesada c9b250d4a4 Adds new tests to tests
and enables profiling

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:18:32 -07:00
boyu0 70df1a6061 closed #2517: Use LocalVarToAuto.py to change Samples src file 2013-08-16 16:05:27 +08:00
Ricardo Quesada 1f37d4d00a More best practices fixes and other bug fixes
- Adds `CC_REQUIRES_NULL_TERMINATION` to methods that require a NULL at the end
- Removes more Hungarian notations in samples
- s/sprite/scene: fix from previous commit
- `CCLog` -> `log`
- `getLayerNamed` -> `getLayer`
- `getPropertyNamed` -> `getProperty`
- and other small fixes
2013-07-23 15:20:22 -07:00
Ricardo Quesada c158cd5be6 More best practices fixes
- Removes Hungarian notation from the CPP test (there are still some Hungarian to remove)
- Label and MotionStreak: Uses the CL() entry for the tests (lambda functions)
2013-07-22 17:25:44 -07:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +08:00
minggo bb758df0d0 issue #2393:mark ccp as deprecated 2013-07-12 14:11:55 +08:00
Ricardo Quesada cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
James Chen 9b9fe67d25 issue #2387: Using static_cast instead of C style cast in iteration of CCArray. 2013-07-09 14:29:51 +08:00
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +08:00
James Chen 1fb9f44d15 issue #2129: Removing CC prefix for samples module. 2013-06-20 14:17:10 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
Ricardo Quesada 022dfc0acc CPP Tests migrated to the new C++11 API
Many tests were converted to the C++11 API
and some tests were also simplified by using the "CL" macro
instead of the "CF" macro.
2013-06-07 17:21:11 -07:00
James Chen c9cdb81020 Removing unused codes. 2013-03-25 14:30:25 +08:00
James Chen f7b2ca2125 Fixing compilation errors when enable CC_ENABLE_PROFILERS. 2013-03-25 11:47:27 +08:00
James Chen 4660e72eda issue #1603: Moved the position of some projects. 2012-12-20 12:58:21 +08:00