diff options
author | Josh MacDonald <josh.macdonald@gmail.com> | 2015-07-18 00:26:11 -0700 |
---|---|---|
committer | Josh MacDonald <josh.macdonald@gmail.com> | 2015-07-18 00:26:11 -0700 |
commit | 73e7b324de6d5e2a1959b61d0619b2c4353e640d (patch) | |
tree | 6d9e607c011cce3c7ae129e375548c34a198b029 /xdelta3/testing | |
parent | 94b7d2c1c9ed371fb9e86d5e3355124a69f338d3 (diff) |
run_release builds 32/64bit binaries for 32/64bit on linux and mingw
Diffstat (limited to 'xdelta3/testing')
-rw-r--r-- | xdelta3/testing/file.h | 5 | ||||
-rw-r--r-- | xdelta3/testing/regtest.cc | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/xdelta3/testing/file.h b/xdelta3/testing/file.h index 67309ac..05f9dde 100644 --- a/xdelta3/testing/file.h +++ b/xdelta3/testing/file.h | |||
@@ -311,8 +311,9 @@ class ExtFile { | |||
311 | public: | 311 | public: |
312 | ExtFile() { | 312 | ExtFile() { |
313 | static int static_counter = 0; | 313 | static int static_counter = 0; |
314 | char buf[32]; | 314 | pid_t pid = getpid(); |
315 | snprintf(buf, 32, "/tmp/regtest.%d", static_counter++); | 315 | char buf[64]; |
316 | snprintf(buf, 64, "/tmp/regtest.%d.%d", pid, static_counter++); | ||
316 | filename_.append(buf); | 317 | filename_.append(buf); |
317 | unlink(filename_.c_str()); | 318 | unlink(filename_.c_str()); |
318 | } | 319 | } |
diff --git a/xdelta3/testing/regtest.cc b/xdelta3/testing/regtest.cc index a09b444..305dc43 100644 --- a/xdelta3/testing/regtest.cc +++ b/xdelta3/testing/regtest.cc | |||
@@ -371,8 +371,10 @@ public: | |||
371 | void TestPrintf() { | 371 | void TestPrintf() { |
372 | char buf[64]; | 372 | char buf[64]; |
373 | xoff_t x = XOFF_T_MAX; | 373 | xoff_t x = XOFF_T_MAX; |
374 | snprintf_func (buf, sizeof(buf), "[%"Q"u]", x); | 374 | snprintf_func (buf, sizeof(buf), "%"Q"u", x); |
375 | XD3_ASSERT(strcmp (buf, "[18446744073709551615]") == 0); | 375 | const char *expect = XD3_USE_LARGEFILE64 ? |
376 | "18446744073709551615" : "4294967295"; | ||
377 | XD3_ASSERT(strcmp (buf, expect) == 0); | ||
376 | } | 378 | } |
377 | 379 | ||
378 | void TestRandomNumbers() { | 380 | void TestRandomNumbers() { |