1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Tests functions handling the lzma_index structure
6 // Copyright (C) 2007 Lasse Collin
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 ///////////////////////////////////////////////////////////////////////////////
26 lzma_index my_index[3] = {
27 { 22, 33, my_index + 1 },
28 { 44, 55, my_index + 2 },
32 lzma_index *i = lzma_index_dup(my_index, NULL);
35 expect(lzma_index_is_equal(my_index, i));
37 i->next->next->uncompressed_size = 99;
38 expect(!lzma_index_is_equal(my_index, i));
40 lzma_index_free(i, NULL);