mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-24 16:27:42 +01:00
71e952401a
Added unit tests
22 lines
403 B
C++
22 lines
403 B
C++
#include "../cpp_foundation/XArray.h"
|
|
|
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
|
|
|
int XArray_tests()
|
|
{
|
|
XArray<UINTN> array1;
|
|
array1.Add(12);
|
|
array1.Add(34);
|
|
array1.Add(56);
|
|
|
|
if ( array1[0] != 12 ) return 1;
|
|
if ( array1[1] != 34 ) return 2;
|
|
if ( array1[2] != 56 ) return 3;
|
|
|
|
array1.RemoveAtIndex(1);
|
|
|
|
if ( array1[1] != 56 ) return 4;
|
|
|
|
return 0;
|
|
}
|