本文整理汇总了C++中TestVector函数的典型用法代码示例。如果您正苦于以下问题:C++ TestVector函数的具体用法?C++ TestVector怎么用?C++ TestVector使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TestVector函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestVector
void TestVector( const Allocator& a )
{
typedef std::vector< typename Allocator::value_type, Allocator > Vector;
Vector v1( Policy< Allocator >::template GetDefault< Vector >( a ) );
Vector v2( Policy< Allocator >::template GetCopied< Vector >( a ) );
TestVector( a, v1 );
TestVector( a, v2 );
v1.swap( v2 );
TestVector( a, v1 );
TestVector( a, v2 );
}
示例2: ParseTextOptions
int
main
(
int argc,
char* argv[]
)
{
ParseTextOptions(&argc, argv);
JXApplication* app = new JXApplication(&argc, argv, "testj2dplot", kDefaultStringData);
assert( app != NULL );
Test2DPlotDirector* dataDir = new Test2DPlotDirector(app);
assert( dataDir != NULL );
TestData(dataDir);
Test2DPlotDirector* logDataDir = new Test2DPlotDirector(app);
assert( logDataDir != NULL );
TestLogData(logDataDir);
Test2DPlotDirector* vectorDir = new Test2DPlotDirector(app);
assert( vectorDir != NULL );
TestVector(vectorDir);
logDataDir->Activate();
dataDir->Activate();
vectorDir->Activate();
app->Run();
return 0;
}
示例3: Run
void LibTest::Run()
{
if ( !TestMatrix() )
{
std::cout << "TestMatrix() failed\n";
}
if ( !TestVector() )
{
std::cout << "TestVector() failed\n";
}
}
示例4: TestWithContainers
void TestWithContainers( const Allocator& a )
{
TestVector( a );
TestDeque( a );
TestList( a );
TestSet( a );
TestMultiset( a );
TestMap( a );
TestMultimap( a );
TestString( a );
TestStack( a );
TestQueue( a );
TestPriorityQueue( a );
}
示例5: WinMain
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
WNDCLASS cs;
cs.cbClsExtra =0;
cs.cbWndExtra = 0;
cs.hbrBackground = (HBRUSH)(COLOR_WINDOW +1);//°×É«±³¾°
cs.hCursor = LoadCursor(NULL,IDC_CROSS);
cs.hIcon = LoadIcon(NULL,IDI_APPLICATION);
cs.hInstance = hInstance;
cs.lpszClassName = "CircleLine";
cs.lpszMenuName = NULL;
cs.style = CS_OWNDC;
cs.lpfnWndProc =(WNDPROC) MyWndProc;
if(!RegisterClass(&cs))
{
MessageBox(NULL,"Register window class error","Error",MB_OK);
}
int x = GetSystemMetrics(SM_CXSCREEN);
int y = GetSystemMetrics(SM_CYSCREEN);
HWND hWindowHandle = CreateWindowEx(WS_EX_CLIENTEDGE|WS_EX_OVERLAPPEDWINDOW,"CircleLine","Lab1",
WS_OVERLAPPEDWINDOW ,x/2,y/2,800,600,NULL,NULL,NULL,NULL);
_ASSERT(hWindowHandle != NULL);
g_hwnd = hWindowHandle;
g_hdc = GetDC(g_hwnd);
Init();
ShowWindow(hWindowHandle,nCmdShow);
UpdateWindow(hWindowHandle);
#ifdef _DEBUG
TestVector();
TestMatrix();
#endif
MSG msg;
while(1)
{
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
// test if this is a quit
if (msg.message == WM_QUIT)
break;
// translate any accelerator keys
TranslateMessage(&msg);
// send the message to the window proc
DispatchMessage(&msg);
} // end if
// main game processing goes here
// Render();
//LOCAL rotation
main_logic(hWindowHandle);
} // end whi
return msg.wParam;
}
示例6: TestHMACSHA512
void TestHMACSHA512(const std::string &hexkey, const std::string &hexin, const std::string &hexout) {
std::vector<unsigned char> key = ParseHex(hexkey);
TestVector(CHMAC_SHA512(&key[0], key.size()), ParseHex(hexin), ParseHex(hexout));
}
示例7: TestRIPEMD160
void TestRIPEMD160(const std::string &in, const std::string &hexout) { TestVector(CRIPEMD160(), in, ParseHex(hexout));}
示例8: TestSHA512
void TestSHA512(const std::string &in, const std::string &hexout) { TestVector(CSHA512(), in, ParseHex(hexout));}
示例9: TestHMACSHA256
static void TestHMACSHA256(const std::string &hexkey, const std::string &hexin, const std::string &hexout) {
std::vector<unsigned char> key = ParseHex(hexkey);
TestVector(CHMAC_SHA256(key.data(), key.size()), ParseHex(hexin), ParseHex(hexout));
}
示例10: TestSHA256
static void TestSHA256(const std::string &in, const std::string &hexout) { TestVector(CSHA256(), in, ParseHex(hexout));}