当前位置: 首页>>代码示例>>C++>>正文


C++ TestVector函数代码示例

本文整理汇总了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 );
}
开发者ID:RhysU,项目名称:suzerain,代码行数:15,代码来源:StlAllocatorTestContainer.hpp

示例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;
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:30,代码来源:testj2dplot.cpp

示例3: Run

void LibTest::Run()
{
    if ( !TestMatrix() )
    {
        std::cout << "TestMatrix() failed\n";
    }

    if ( !TestVector() )
    {
        std::cout << "TestVector() failed\n";
    }
}
开发者ID:jpgaribotti,项目名称:LibTest,代码行数:12,代码来源:LibTest.cpp

示例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 );
}
开发者ID:RhysU,项目名称:suzerain,代码行数:14,代码来源:StlAllocatorTestContainer.hpp

示例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;
}
开发者ID:orbv,项目名称:Simple-3D-Software-Render,代码行数:64,代码来源:Main.cpp

示例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));
}
开发者ID:thelonecrouton,项目名称:uniqredit,代码行数:4,代码来源:crypto_tests.cpp

示例7: TestRIPEMD160

void TestRIPEMD160(const std::string &in, const std::string &hexout) { TestVector(CRIPEMD160(), in, ParseHex(hexout));}
开发者ID:thelonecrouton,项目名称:uniqredit,代码行数:1,代码来源:crypto_tests.cpp

示例8: TestSHA512

void TestSHA512(const std::string &in, const std::string &hexout) { TestVector(CSHA512(), in, ParseHex(hexout));}
开发者ID:thelonecrouton,项目名称:uniqredit,代码行数:1,代码来源:crypto_tests.cpp

示例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));
}
开发者ID:JeremyRubin,项目名称:bitcoin,代码行数:4,代码来源:crypto_tests.cpp

示例10: TestSHA256

static void TestSHA256(const std::string &in, const std::string &hexout) { TestVector(CSHA256(), in, ParseHex(hexout));}
开发者ID:JeremyRubin,项目名称:bitcoin,代码行数:1,代码来源:crypto_tests.cpp


注:本文中的TestVector函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。