Skip to content

Commit

Permalink
Fixed test compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
madmaxoft committed May 29, 2014
1 parent 80fe19c commit c5763f3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions tests/ChunkData/ArraytoCoord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ int main(int argc, char** argv)
BLOCKTYPE SrcBlockBuffer[16 * 16 * 256];
memset(SrcBlockBuffer, 0x00, 16 * 16 * 256);
SrcBlockBuffer[7 + (4 * 16) + (5 * 16 * 16)] = 0xCD;
buffer.SetBlocks(SrcBlockBuffer);
buffer.SetBlockTypes(SrcBlockBuffer);
testassert(buffer.GetBlock(7,5,4) == 0xCD);

NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2];
memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 / 2);
SrcNibbleBuffer[(6 + (1 * 16) + (2 * 16 * 16)) / 2] = 0xE;
buffer.SetMeta(SrcNibbleBuffer);
buffer.SetMetas(SrcNibbleBuffer);
testassert(buffer.GetMeta(6, 2, 1) == 0xE);

memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 / 2);
Expand All @@ -40,13 +40,13 @@ int main(int argc, char** argv)
BLOCKTYPE SrcBlockBuffer[16 * 16 * 256];
memset(SrcBlockBuffer, 0x00, 16 * 16 * 256);
SrcBlockBuffer[7 + (4 * 16) + (24 * 16 * 16)] = 0xCD;
buffer.SetBlocks(SrcBlockBuffer);
buffer.SetBlockTypes(SrcBlockBuffer);
testassert(buffer.GetBlock(7, 24, 4) == 0xCD);

NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2];
memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 / 2);
SrcNibbleBuffer[(6 + (1 * 16) + (24 * 16 * 16)) / 2] = 0xE;
buffer.SetMeta(SrcNibbleBuffer);
buffer.SetMetas(SrcNibbleBuffer);
testassert(buffer.GetMeta(6, 24, 1) == 0xE);

memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 /2);
Expand All @@ -66,12 +66,12 @@ int main(int argc, char** argv)

BLOCKTYPE SrcBlockBuffer[16 * 16 * 256];
memset(SrcBlockBuffer, 0x00, 16 * 16 * 256);
buffer.SetBlocks(SrcBlockBuffer);
buffer.SetBlockTypes(SrcBlockBuffer);
testassert(buffer.GetBlock(7, 24, 4) == 0x00);

NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256/2];
memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 /2);
buffer.SetMeta(SrcNibbleBuffer);
buffer.SetMetas(SrcNibbleBuffer);
testassert(buffer.GetMeta(6, 24, 1) == 0x0);

memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 /2);
Expand Down
20 changes: 10 additions & 10 deletions tests/ChunkData/Copies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ int main(int argc, char** argv)
SrcBlockBuffer[i+3] = 0xEF;
}

buffer.SetBlocks(SrcBlockBuffer);
buffer.SetBlockTypes(SrcBlockBuffer);
BLOCKTYPE DstBlockBuffer[16 * 16 * 256];
buffer.CopyBlocks(DstBlockBuffer);
buffer.CopyBlockTypes(DstBlockBuffer);
testassert(memcmp(SrcBlockBuffer, DstBlockBuffer, (16 * 16 * 256) - 1) == 0);

memset(SrcBlockBuffer, 0x00, 16 * 16 * 256);
buffer.SetBlocks(SrcBlockBuffer);
buffer.CopyBlocks(DstBlockBuffer);
buffer.SetBlockTypes(SrcBlockBuffer);
buffer.CopyBlockTypes(DstBlockBuffer);
testassert(memcmp(SrcBlockBuffer, DstBlockBuffer, (16 * 16 * 256) - 1) == 0);

}
Expand All @@ -48,14 +48,14 @@ int main(int argc, char** argv)
SrcNibbleBuffer[i+3] = 0xBE;
}

buffer.SetMeta(SrcNibbleBuffer);
buffer.SetMetas(SrcNibbleBuffer);
NIBBLETYPE DstNibbleBuffer[16 * 16 * 256/ 2];
buffer.CopyMeta(DstNibbleBuffer);
buffer.CopyMetas(DstNibbleBuffer);
testassert(memcmp(SrcNibbleBuffer, DstNibbleBuffer, (16 * 16 * 256 / 2) - 1) == 0);

memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 /2);
buffer.SetMeta(SrcNibbleBuffer);
buffer.CopyMeta(DstNibbleBuffer);
buffer.SetMetas(SrcNibbleBuffer);
buffer.CopyMetas(DstNibbleBuffer);
testassert(memcmp(SrcNibbleBuffer, DstNibbleBuffer, (16 * 16 * 256 / 2) - 1) == 0);


Expand Down Expand Up @@ -114,13 +114,13 @@ int main(int argc, char** argv)
BLOCKTYPE SrcBlockBuffer[16 * 16 * 256];
memset(SrcBlockBuffer, 0x00, 16 * 16 * 256);
BLOCKTYPE DstBlockBuffer[16 * 16 * 256];
buffer.CopyBlocks(DstBlockBuffer);
buffer.CopyBlockTypes(DstBlockBuffer);
testassert(memcmp(SrcBlockBuffer, DstBlockBuffer, (16 * 16 * 256) - 1) == 0);

NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2];
memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 / 2);
NIBBLETYPE DstNibbleBuffer[16 * 16 * 256 / 2];
buffer.CopyMeta(DstNibbleBuffer);
buffer.CopyMetas(DstNibbleBuffer);
testassert(memcmp(SrcNibbleBuffer, DstNibbleBuffer, (16 * 16 * 256 / 2) - 1) == 0);

memset(SrcNibbleBuffer, 0x00, 16 * 16 * 256 / 2);
Expand Down

0 comments on commit c5763f3

Please sign in to comment.