Commit Graph

27 Commits

Author SHA1 Message Date
88f25849b3 Windows fixes
This was SVN commit r7715.
2010-07-07 22:23:18 +00:00
9b9e4fa1b4 Support Unicode reliably in logger, via explicit conversion to UTF-8.
Expand date buffer to avoid Y10K bug, Y100K bug, etc.

This was SVN commit r7694.
2010-07-05 00:03:10 +00:00
8268d8ad0b Fix CStr8 serialisation bug.
This was SVN commit r7651.
2010-06-30 21:24:14 +00:00
42bcb175ff Add test for network simulation message serialization.
Fix network simulation message serialization.

This was SVN commit r7586.
2010-05-25 20:48:06 +00:00
94e5d88169 # Add out-of-sync multiplayer checks.
Change CStr8 serialization to allow \0 in strings.

This was SVN commit r7565.
2010-05-22 14:05:56 +00:00
aafe575445 Fix buffer overflow in logger. Add tests for it. Make this kind of error harder to miss.
This was SVN commit r7244.
2010-01-05 19:55:09 +00:00
455137afed Fix broken tests
This was SVN commit r7211.
2009-11-24 15:36:08 +00:00
8a52113e60 huge cleanup and conversion of most string handling (especially paths) to unicode
please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
2009-11-03 21:46:35 +00:00
f4cdd7098c Fix #251 (Config parser doesn't ignore comments), based on patch from Cygal
This was SVN commit r7109.
2009-08-12 15:17:35 +00:00
5c8861adf4 Remove redundant -L linker arguments on non-Windows.
Fix some compiler warnings.
Fix missing non-PCH headers.

This was SVN commit r7083.
2009-08-07 17:22:05 +00:00
58ee7038db Fix CLogger tests
This was SVN commit r7080.
2009-08-07 14:25:14 +00:00
fcf9db0d53 Decode invalid utf-8 more gracefully (invalid bytes becomes U+FFFD)
This was SVN commit r6999.
2009-07-16 15:52:18 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
1e3cd00c72 Set svn:eol-style=native
This was SVN commit r6816.
2009-04-11 17:00:39 +00:00
b979033385 Stopped CLogger outputting error messages with debug_printf while in test cases that are intentionally triggering errors.
This was SVN commit r6259.
2008-07-19 19:02:27 +00:00
ad55f9f1bc pending improvements and partial fixes to self-tests
fix: g_frequencyFilter is now in globals.cpp instead of in main (since
other modules access it and main.cpp isn't included in the self-test)
fix: globals.h now avoids dragging sdl.h into other projects
allocators: got rid of references to the old master header (must now
include the specific header, e.g. dynarray.h)

This was SVN commit r5534.
2008-01-03 22:07:18 +00:00
a34b759720 . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it.
. timer, config: fix definition of ALLOW_RDTSC
. add movsx_be64 (for whirlpool), revise implementation, move to
byte_order, add test
. MAX -> std::max, remove those macros
. add timestamp to system_info as requested by philip

This was SVN commit r5050.
2007-05-09 21:01:11 +00:00
8b7d1fcfb3 * Moved command-line options list from system.cfg into readme.txt. Updated the list to reflect reality. Removed -novbo option because you can use the .cfg file instead.
* Changed log files to trigger standards mode in Firefox (to be
consistent with other browsers), by making it valid HTML5. Changed the
font and some spacing.
 * Made CLogger default to ignoring messages if it hasn't been
initialised yet, instead of crashing.
 * Added leak reporting to the unit tests.
 * Renamed mods/_tests to mods/_test.xero, since it's only used by
Xeromyces and the other tests use mods/_test.otherstuff instead.
 * Fixed Atlas compilation on Windows.
 * Moved Atlas's DLL-loading code into a separate class, so it can be
shared.

This was SVN commit r4707.
2006-12-20 03:09:21 +00:00
cbafd43eea # Changed handling of command-line arguments.
* Added CmdLineArgs, which does the parsing then lets various pieces of
code check for whatever arguments they want.
 * Made Atlas exit out of main() cleanly, instead of calling exit()
itself.
 * Disabled the global exception-catching in unit tests, via a
entry_noSEH, so it doesn't make debugging harder.
 * Added nice printing of CStr in unit test failure messages, and added
comparison of vector vs constant array.

This was SVN commit r4688.
2006-12-09 14:39:52 +00:00
db045c330b # Made Atlas compile on linux
graphics: basic terrain passibility
atlas: lots of changes to make atlas compile under linux
unix/X: more clipboard support - copy from 0AD to other programs
unix/debug: use sys_get_executable_name instead of hard-coded paths
... and lots of other misc. changes

This was SVN commit r4640.
2006-11-12 04:02:36 +00:00
a265a441fd # Fixed string handling for Windows/Linux compatibility.
* vsnprintf2: Made compatible between GCC and MSVC - it now always
null-terminates the buffer, and returns -1 on overflow. Fixes #158.
Added tests.
 * MeshManager: Use shared_ptr.expired() instead of checking for
bad_weak_ptr exception.
 * Xeromyces: Added tests for GetXMBPath, because it does unusual things
in sscanf which MSVC's /analyze complains about.
 * ConfigDB, ScriptGlue: Replaced some asserts with return-on-failure,
to avoid invalid array accesses when continuing after the assert (as
complained about by /analyze).
 * CStr: Removed "using namespace std". Added tests for handling of
invalid UTF-8.

This was SVN commit r4625.
2006-11-07 21:03:13 +00:00
2fac02f40a # Actor Viewer tool: added controls to toggle shadows, ground and polygon counts.
Elsewhere:
Disabled stack-trace test because it gives me assertion failures.
Fixed some uses of snprintf (which doesn't always add a \0 to the end of
the string), then got bored so there are still lots of broken ones.
Probably should replace snprintf with something more like snprintf_s
(but non-fatal) or something.
Made CLogger output valid HTML (except for the potentially dodgy
doctype). Removed its memory-logger, since we never use it and MICROLOG
can be used instead for quick execution-tracing.
Added tests to make sure CLogger handles long strings properly (which it
didn't). Made CLogger not a singleton, so it can be tested sensibly.

This was SVN commit r4424.
2006-09-28 20:41:12 +00:00
2f53eea71a Actor Viewer: Added controls for wireframe, background colour, move-when-walking. Reduced CPU usage when 'playing' things with no animation.
Color: Moved SColor* structs into SColor.h, so they can be used without
indirectly including CVector[34]D.
Terrain: Added 'base colour', for the Actor Viewer to be able to
modulate the colour of normally-white terrain.
Removed some "using namespace std" (because it doesn't make the code
easier to read, and it defeats the point of namespaces, and the rest of
the code doesn't do it).

This was SVN commit r4392.
2006-09-26 01:44:20 +00:00
e53242284f # Updates to unit-testing system.
Premake: Changed to use PCH when compiling tests.
CxxTest: Got rid of /Wp64 warnings. Changed TS_ASSERT_STR_EQUALS to
print both strings on failure.
win_internal: Added the bits that CxxTest::Win32Gui needs (because
Win32Gui is now compiled with PCH and uses our sysdep headers).
Disabled test_cache_policies, because it took long enough for me to read
its name.

This was SVN commit r4237.
2006-08-22 21:38:53 +00:00
9542ecdd7e # boatload of fixes to get self-tests to compile+mostly run
refs #117

stub_impl_hack: defines a function otherwise provided by main.cpp

remove old self_test.h contents (e.g. TEST); superceded by cxxtestgen
TS_ASSERT etc.
only include self_test from a test (otherwise, cxxtest include dir won't
be set)
cxxtest won't run tests named only "test"; add more descriptive name

FIXES uncovered by self tests
lib: infinite loop in log2
lockfree: incorrect params

This was SVN commit r3979.
2006-06-08 19:03:43 +00:00
76cbda8713 This was SVN commit r3971. 2006-06-07 22:15:29 +00:00
e0dfbe719d # add boatload of self-tests
(these are the old self-tests ripped out as well as new ones)
note: have not run yet; several would surely fail if they run (can't
anyway until cxxtest is installed)

This was SVN commit r3912.
2006-05-31 04:17:45 +00:00