diff options
author | Erik de Castro Lopo <erikd@mingus> | 2006-08-08 08:13:40 +0000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mingus> | 2006-08-08 08:13:40 +0000 |
commit | cb54001ed9bb75cc5bdc81a197eb2a72e5e7079f (patch) | |
tree | 2d6c5361b2d99a13671e2bbc035606b0e54ba916 /tests/cpp_test.cc | |
parent | 7947d0bc9955c93f1f554fa6b193c19d02b9bcd2 (diff) |
More sndfile.hh updates.
Diffstat (limited to 'tests/cpp_test.cc')
-rw-r--r-- | tests/cpp_test.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/cpp_test.cc b/tests/cpp_test.cc index c1c2130..5d52b5c 100644 --- a/tests/cpp_test.cc +++ b/tests/cpp_test.cc @@ -93,15 +93,17 @@ read_file (const char * filename, int format) file = SndfileHandle (filename) ; - SndfileHandle file2 = file ; - - if (file.refCount () != 2) - { printf ("\n\n%s %d : Error : Reference count (%d) should be zero.\n\n", __func__, __LINE__, file.refCount ()) ; - exit (1) ; + if (1) + { SndfileHandle file2 = file ; + + if (file.refCount () != 2 || file2.refCount () != 2) + { printf ("\n\n%s %d : Error : Reference count (%d) should be two.\n\n", __func__, __LINE__, file.refCount ()) ; + exit (1) ; + } ; } ; - if (file2.refCount () != 2) - { printf ("\n\n%s %d : Error : Reference count (%d) should be zero.\n\n", __func__, __LINE__, file.refCount ()) ; + if (file.refCount () != 1) + { printf ("\n\n%s %d : Error : Reference count (%d) should be one.\n\n", __func__, __LINE__, file.refCount ()) ; exit (1) ; } ; |