initial commit
This commit is contained in:
parent
81af403965
commit
573e1a9fa3
220 changed files with 150440 additions and 0 deletions
31
test/test_id.c
Normal file
31
test/test_id.c
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// SPDX-FileCopyrightText: 2023 Erin Catto
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
#include "box3d/types.h"
|
||||
|
||||
int IdTest( void )
|
||||
{
|
||||
uint64_t x = 0x0123456789ABCDEFull;
|
||||
|
||||
{
|
||||
b3BodyId id = b3LoadBodyId( x );
|
||||
uint64_t y = b3StoreBodyId( id );
|
||||
ENSURE( x == y );
|
||||
}
|
||||
|
||||
{
|
||||
b3ShapeId id = b3LoadShapeId( x );
|
||||
uint64_t y = b3StoreShapeId( id );
|
||||
ENSURE( x == y );
|
||||
}
|
||||
|
||||
{
|
||||
b3JointId id = b3LoadJointId( x );
|
||||
uint64_t y = b3StoreJointId( id );
|
||||
ENSURE( x == y );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in a new issue