您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CheckStatsNode函数代码示例

51自学网 2021-06-01 20:10:42
  C++
这篇教程C++ CheckStatsNode函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CheckStatsNode函数的典型用法代码示例。如果您正苦于以下问题:C++ CheckStatsNode函数的具体用法?C++ CheckStatsNode怎么用?C++ CheckStatsNode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CheckStatsNode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: fBuild

// TestTwoDLLs//------------------------------------------------------------------------------void TestDLL::TestTwoDLLs() const{	FBuildOptions options;	options.m_ConfigFile = "Data/TestDLL/fbuild.bff";	options.m_ShowSummary = true; // required to generate stats for node count checks	FBuild fBuild( options );	TEST_ASSERT( fBuild.Initialize() );	const AStackString<> dllA( "../../../../tmp/Test/DLL/dllA.dll" );	const AStackString<> dllB( "../../../../tmp/Test/DLL/dllB.dll" );	// clean up anything left over from previous runs	EnsureFileDoesNotExist( dllA );	EnsureFileDoesNotExist( dllB );	// build dllB which depends on dllA	TEST_ASSERT( fBuild.Build( dllB ) );	TEST_ASSERT( fBuild.SaveDependencyGraph( GetTwoDLLsDBFileName() ) );	// make sure all output files are as expecter	EnsureFileExists( dllA );	EnsureFileExists( dllB );	// Check stats	//				 Seen,	Built,	Type	CheckStatsNode ( 5,		2,		Node::FILE_NODE );	// 2 cpp files	CheckStatsNode ( 1,		1,		Node::COMPILER_NODE );	CheckStatsNode ( 2,		2,		Node::OBJECT_NODE );	CheckStatsNode ( 2,		2,		Node::OBJECT_LIST_NODE );	CheckStatsNode ( 2,		2,		Node::DLL_NODE );	CheckStatsTotal( 12,	9 );}
开发者ID:ClxS,项目名称:fastbuild,代码行数:34,


示例2: fBuild

// TestLibMerge//------------------------------------------------------------------------------void TestBuildAndLinkLibrary::TestLibMerge() const{    FBuildOptions options;    options.m_ForceCleanBuild = true;    options.m_ShowSummary = true; // required to generate stats for node count checks    options.m_ConfigFile = "Data/TestBuildAndLinkLibrary/fbuild.bff";    FBuild fBuild( options );    TEST_ASSERT( fBuild.Initialize() );    const AStackString<> lib( "../../../../tmp/Test/BuildAndLinkLibrary/merged.lib" );    // clean up anything left over from previous runs    EnsureFileDoesNotExist( lib );    // Build    TEST_ASSERT( fBuild.Build( lib ) );    TEST_ASSERT( fBuild.SaveDependencyGraph( GetMergeLibDBFileName() ) );    // make sure all output files are as expected    EnsureFileExists( lib );    // Check stats    //               Seen,  Built,  Type    CheckStatsNode ( 7,     4,      Node::FILE_NODE ); // 3x .cpp + 3x .h + librarian    CheckStatsNode ( 1,     1,      Node::COMPILER_NODE );    CheckStatsNode ( 1,     1,      Node::OBJECT_LIST_NODE );    CheckStatsNode ( 3,     3,      Node::OBJECT_NODE );    CheckStatsNode ( 3,     3,      Node::LIBRARY_NODE ); // 2 libs + merge lib    CheckStatsTotal( 15,    12 );}
开发者ID:liamkf,项目名称:fastbuild,代码行数:33,


示例3: fBuild

// Build_CacheHit//------------------------------------------------------------------------------void TestCUDA::Build_CacheHit() const{    FBuildOptions options;    options.m_ConfigFile = "Data/TestCUDA/cuda.bff";    options.m_UseCacheRead = true;    options.m_ShowSummary = true; // required to generate stats for node count checks    FBuild fBuild( options );    TEST_ASSERT( fBuild.Initialize( "../../../../tmp/Test/CUDA/cuda.fdb" ) );    const AStackString<> obj( "../../../../tmp/Test/CUDA/test.obj" );    // clean up anything left over from previous runs    EnsureFileDoesNotExist( obj );    // build (via alias)    TEST_ASSERT( fBuild.Build( AStackString<>( "CUDA-Obj" ) ) );    // make sure all output is where it is expected    EnsureFileExists( obj );    // Check stats    //				 Seen,	Built,	Type    CheckStatsNode ( 65,	65,		Node::FILE_NODE ); // many included files    CheckStatsNode ( 1,		0,		Node::COMPILER_NODE );    CheckStatsNode ( 1,		0,		Node::OBJECT_NODE );    CheckStatsNode ( 1,		1,		Node::OBJECT_LIST_NODE );    CheckStatsTotal( 68,	66 );    // Test we got a cache hit    const FBuildStats::Stats & objStats = fBuild.GetStats().GetStatsFor( Node::OBJECT_NODE );    TEST_ASSERT( objStats.m_NumCacheHits == 1 );}
开发者ID:Manuzor,项目名称:fastbuild,代码行数:34,


示例4: unity1

// TestGenerate_NoRebuild//------------------------------------------------------------------------------void TestUnity::TestGenerate_NoRebuild() const{	AStackString<> unity1( "../../../../tmp/Test/Unity/Unity1.cpp" );	AStackString<> unity2( "../../../../tmp/Test/Unity/Unity2.cpp" );	EnsureFileExists( unity1 );	EnsureFileExists( unity2 );	// Unity must be "built" every time, but it only writes files when they change	// so record the time before and after	uint64_t dateTime1 = FileIO::GetFileLastWriteTime( unity1 );	uint64_t dateTime2 = FileIO::GetFileLastWriteTime( unity2 );	// NTFS file resolution is 100ns, so sleep long enough to ensure	// an invalid write would modify the time	Thread::Sleep( 1 ); // 1ms	FBuildStats stats = BuildGenerate();	// Make sure files have not been changed	TEST_ASSERT( dateTime1 == FileIO::GetFileLastWriteTime( unity1 ) );	TEST_ASSERT( dateTime2 == FileIO::GetFileLastWriteTime( unity2 ) );	// Check stats	//						Seen,	Built,	Type	CheckStatsNode ( stats,	1,		1,		Node::DIRECTORY_LIST_NODE );	CheckStatsNode ( stats,	1,		1,		Node::UNITY_NODE );	CheckStatsTotal( stats,	2,		2 );}
开发者ID:poppolopoppo,项目名称:fastbuild,代码行数:31,


示例5: fBuild

// TestCopyFunction_SourceBasePath//------------------------------------------------------------------------------void TestCopy::TestCopyFunction_SourceBasePath() const{	FBuildOptions options;	options.m_ConfigFile = "Data/TestCopy/copy.bff";	options.m_ShowSummary = true; // required to generate stats for node count checks	FBuild fBuild( options );	TEST_ASSERT( fBuild.Initialize() );	const AStackString<> dst1( "../../../../tmp/Test/Copy/SourceBasePath/TestCopy/a.txt" );	const AStackString<> dst2( "../../../../tmp/Test/Copy/SourceBasePath/TestCopy/b.txt" );	// clean up anything left over from previous runs	EnsureFileDoesNotExist( dst1 );	EnsureFileDoesNotExist( dst2 );	// build (via alias)	TEST_ASSERT( fBuild.Build( AStackString<>( "TestSourceBasePath" ) ) );	TEST_ASSERT( fBuild.SaveDependencyGraph( "../../../../tmp/Test/Copy/SourceBasePath/sourcebasepath.fdb" ) );	EnsureFileExists( dst1 );	EnsureFileExists( dst2 );	// Check stats	//				 Seen,	Built,	Type	CheckStatsNode ( 2,		2,		Node::FILE_NODE );	CheckStatsNode ( 2,		2,		Node::COPY_NODE );	CheckStatsNode ( 1,		1,		Node::ALIAS_NODE );	CheckStatsTotal( 5,		5 );}
开发者ID:ClxS,项目名称:fastbuild,代码行数:31,


示例6: obj

// TestPCHClang_NoRebuild//------------------------------------------------------------------------------void TestPrecompiledHeaders::TestPCHClang_NoRebuild() const{	FBuildOptions options;	options.m_ConfigFile = "Data/TestPrecompiledHeaders/fbuild.bff";	options.m_ShowSummary = true; // required to generate stats for node count checks	AStackString<> obj( "../../../../ftmp/Test/PrecompiledHeaders/Clang/PCHUser.obj" );	AStackString<> pch( "../../../../ftmp/Test/PrecompiledHeaders/Clang/PrecompiledHeader.pch" );	FBuild fBuild( options );	TEST_ASSERT( fBuild.Initialize( GetPCHDBClangFileName() ) );	AStackString<> target( "PCHTestClang" );	TEST_ASSERT( fBuild.Build( target ) );	TEST_ASSERT( fBuild.SaveDependencyGraph( GetPCHDBClangFileName() ) );		// Check stats	//				Seen,	Built,	Type	CheckStatsNode ( 2,		2,		Node::FILE_NODE );	// cpp + pch	CheckStatsNode ( 1,		0,		Node::COMPILER_NODE );	CheckStatsNode ( 2,		0,		Node::OBJECT_NODE );// obj + pch obj	CheckStatsNode ( 1,		0,		Node::OBJECT_LIST_NODE );	CheckStatsTotal( 6,		2 );}
开发者ID:scott-nelson,项目名称:fastbuild,代码行数:27,


示例7: fBuild

//  REGISTER_TEST( TestMixedAssemblyWithCPP ) // TODO:A EnableREGISTER_TESTS_END// TestSingleFile//------------------------------------------------------------------------------void TestCSharp::TestSingleFile() const{    FBuildTestOptions options;    options.m_ConfigFile = "Tools/FBuild/FBuildTest/Data/TestCSharp/csharp.bff";    options.m_ForceCleanBuild = true;    FBuild fBuild( options );    TEST_ASSERT( fBuild.Initialize() );    // delete files from previous runs    EnsureFileDoesNotExist( "../tmp/Test/CSharp/csharpsingle.dll" );    // Build it    TEST_ASSERT( fBuild.Build( AStackString<>( "CSharp-Single-Target" ) ) );    TEST_ASSERT( fBuild.SaveDependencyGraph( "../tmp/Test/CSharp/csharpsingle.fdb" ) );    // Test output file    EnsureFileExists( "../tmp/Test/CSharp/csharpsingle.dll" );    // Check stats    //               Seen,  Built,  Type    CheckStatsNode ( 1,     1,      Node::COMPILER_NODE );    CheckStatsNode ( 1,     1,      Node::FILE_NODE );  // 1 cs file    CheckStatsNode ( 1,     1,      Node::CS_NODE );    CheckStatsNode ( 1,     1,      Node::ALIAS_NODE );    CheckStatsTotal( 4,     4 );}
开发者ID:dummyunit,项目名称:fastbuild,代码行数:32,


示例8: fBuild

// TestMSVC_P//------------------------------------------------------------------------------void TestIncludeParser::TestMSVC_P() const{    FBuildOptions options;    options.m_ShowSummary = true; // required to generate stats for node count checks    options.m_ConfigFile = "Data/TestIncludeParser/MSVC-P/fbuild.bff";    FBuild fBuild( options );    fBuild.Initialize();    const AStackString<> file( "../../../../tmp/Test/IncludeParser/MSVC-P/test.i" );    // clean up anything left over from previous runs    EnsureFileDoesNotExist( file );    // Build    TEST_ASSERT( fBuild.Build( AStackString<>( "MSVC-P" ) ) );    // make sure all output files are as expected    EnsureFileExists( file );    // Check stats    //               Seen,  Built,  Type    CheckStatsNode ( 1,     1,      Node::OBJECT_LIST_NODE );    CheckStatsNode ( 1,     1,      Node::FILE_NODE );    CheckStatsNode ( 1,     1,      Node::COMPILER_NODE );    CheckStatsNode ( 1,     1,      Node::OBJECT_NODE );    CheckStatsTotal( 4,     4 );}
开发者ID:dontnod,项目名称:fastbuild,代码行数:30,


示例9: fBuild

// TestMultipleFiles//------------------------------------------------------------------------------void TestCSharp::TestMultipleFiles() const{	FBuildOptions options;	options.m_ConfigFile = "Data/TestCSharp/csharp.bff";	options.m_ForceCleanBuild = true;	options.m_ShowSummary = true; // required to generate stats for node count checks	FBuild fBuild( options );	TEST_ASSERT( fBuild.Initialize() );	// delete files from previous runs	EnsureFileDoesNotExist( "../../../../tmp/Test/CSharp/csharpmulti.dll" );		// Build it	TEST_ASSERT( fBuild.Build( AStackString<>( "CSharp-Multi-Target" ) ) );	TEST_ASSERT( fBuild.SaveDependencyGraph( "../../../../tmp/Test/CSharp/csharpmulti.fdb" ) );	// Test output files	EnsureFileExists( "../../../../tmp/Test/CSharp/csharpmulti.dll" );	// Check stats	//				 Seen,	Built,	Type	CheckStatsNode ( 3,		3,		Node::FILE_NODE );	// 3x cs	CheckStatsNode ( 1,		1,		Node::CS_NODE );	CheckStatsNode ( 1,		1,		Node::ALIAS_NODE );	CheckStatsNode ( 1,		1,		Node::DIRECTORY_LIST_NODE );	CheckStatsTotal( 6,		6 );}
开发者ID:ClxS,项目名称:fastbuild,代码行数:30,


示例10: project

// TestFunction//------------------------------------------------------------------------------void TestProjectGeneration::TestFunction() const{	AStackString<> project( "../../../../ftmp/Test/ProjectGeneration/testproj.vcxproj" );	AStackString<> solution( "../../../../ftmp/Test/ProjectGeneration/testsln.sln" );	AStackString<> filters( "../../../../ftmp/Test/ProjectGeneration/testproj.vcxproj.filters" );	EnsureFileDoesNotExist( project );	EnsureFileDoesNotExist( solution );	EnsureFileDoesNotExist( filters );	FBuildOptions options;	options.m_ConfigFile = "Data/TestProjectGeneration/fbuild.bff";	options.m_ForceCleanBuild = true;	options.m_ShowSummary = true; // required to generate stats for node count checks	FBuild fBuild( options );	TEST_ASSERT( fBuild.Initialize() );	TEST_ASSERT( fBuild.Build( AStackString<>( "TestSln" ) ) );	TEST_ASSERT( fBuild.SaveDependencyGraph( "../../../../ftmp/Test/ProjectGeneration/fbuild.fdb" ) );	EnsureFileExists( project );	EnsureFileExists( solution );	EnsureFileExists( filters );	// Check stats	//				 Seen,	Built,	Type	CheckStatsNode ( 1,		1,		Node::DIRECTORY_LIST_NODE );	CheckStatsNode ( 1,		1,		Node::VCXPROJECT_NODE );	CheckStatsNode ( 1,		1,		Node::SLN_NODE );	CheckStatsNode ( 1,		1,		Node::ALIAS_NODE );	CheckStatsTotal( 4,		4 );}
开发者ID:scott-nelson,项目名称:fastbuild,代码行数:33,


示例11: srcFile

// MultipleCopyNodes//------------------------------------------------------------------------------void TestCopy::MultipleCopyNodes() const{	const AStackString<> srcFile( "Data/TestGraph/library.cpp" );	const AStackString<> dstFileA( "../../../../tmp/Test/Graph/library.multiplecopynodes1.cpp" );	const AStackString<> dstFileB( "../../../../tmp/Test/Graph/library.multiplecopynodes2.cpp" );	const AStackString<> dstFileC( "../../../../tmp/Test/Graph/library.multiplecopynodes3.cpp" );	// check files are as expected before starting test	EnsureFileDoesNotExist( dstFileA );	EnsureFileDoesNotExist( dstFileB );	EnsureFileDoesNotExist( dstFileC );	EnsureFileExists( srcFile );	FBuildOptions options;	options.m_ShowSummary = true; // required to generate stats for node count checks	// build	{		FBuild fb( options );		NodeGraph & ng = fb.GetDependencyGraph();		// make a fileNode for the source		FileNode * srcNode = ng.CreateFileNode( srcFile );		Dependencies empty;		Node * copyA = ng.CreateCopyNode( dstFileA, srcNode, empty );		Node * copyB = ng.CreateCopyNode( dstFileB, (FileNode *)copyA, empty );		Node * copyC = ng.CreateCopyNode( dstFileC, (FileNode *)copyB, empty );		TEST_ASSERT( fb.Build( copyC ) );		TEST_ASSERT( fb.SaveDependencyGraph( "../../../../tmp/Test/Graph/multiplecopynode.fdb" ) );		EnsureFileExists( dstFileA );		EnsureFileExists( dstFileB );		EnsureFileExists( dstFileC );		// Check stats		//				 Seen,	Built,	Type		CheckStatsNode ( 1,		1,		Node::FILE_NODE );		CheckStatsNode ( 3,		3,		Node::COPY_NODE );		CheckStatsTotal( 4,		4 );	}	// check no rebuild	{		FBuild fb( options );		fb.Initialize( "../../../../tmp/Test/Graph/multiplecopynode.fdb" );		TEST_ASSERT( fb.Build( dstFileC ) );		// Check stats		//				 Seen,	Built,	Type		CheckStatsNode ( 1,		1,		Node::FILE_NODE );		CheckStatsNode ( 3,		0,		Node::COPY_NODE );		CheckStatsTotal( 4,		1 );	}}
开发者ID:ClxS,项目名称:fastbuild,代码行数:59,


示例12: testFileName

REGISTER_TESTS_END// SingleCopyNode//------------------------------------------------------------------------------void TestCopy::SingleCopyNode() const{	const AStackString<> testFileName( "Data/TestGraph/library.cpp" );	const AStackString<> testFileNameCopy( "../../../../tmp/Test/Graph/library.copynode.cpp" );	// check files are in expected states	EnsureFileExists( testFileName );	EnsureFileDoesNotExist( testFileNameCopy );	FBuildOptions options;	options.m_ShowSummary = true; // required to generate stats for node count checks	// Build	{		FBuild fb( options );		NodeGraph & ng = fb.GetDependencyGraph();		// make a fileNode for the source		FileNode * srcNode = ng.CreateFileNode( testFileName );		// and an ObjectNode for the output		Dependencies empty;		Node * dstNode = ng.CreateCopyNode( testFileNameCopy, srcNode, empty );		TEST_ASSERT( fb.Build( dstNode ) );		TEST_ASSERT( fb.SaveDependencyGraph( "../../../../tmp/Test/Graph/singlecopynode.fdb" ) );		EnsureFileExists( testFileNameCopy );		// Check stats		//				 Seen,	Built,	Type		CheckStatsNode ( 1,		1,		Node::FILE_NODE );		CheckStatsNode ( 1,		1,		Node::COPY_NODE );		CheckStatsTotal( 2,		2 );	}	// check no rebuild	{		FBuild fb( options );		fb.Initialize( "../../../../tmp/Test/Graph/singlecopynode.fdb" );		TEST_ASSERT( fb.Build( testFileNameCopy ) );		// Check stats		//				 Seen,	Built,	Type		CheckStatsNode ( 1,		1,		Node::FILE_NODE );		CheckStatsNode ( 1,		0,		Node::COPY_NODE );		CheckStatsTotal( 2,		1 );	}}
开发者ID:ClxS,项目名称:fastbuild,代码行数:54,


示例13: Build

// Test_NoBuild//------------------------------------------------------------------------------void TestCLR::Test_NoBuild() const{	FBuildOptions options;	options.m_ShowSummary = true; // required to generate stats for node count checks	FBuildStats stats = Build( options, true, "CLR-Target" );	// Check stats	//						Seen,	Built,	Type	CheckStatsNode ( stats,	3,		3,		Node::FILE_NODE );	// cpp + h + mscorlib	CheckStatsNode ( stats,	1,		0,		Node::COMPILER_NODE );	CheckStatsNode ( stats,	1,		0,		Node::OBJECT_NODE );	CheckStatsNode ( stats,	1,		0,		Node::LIBRARY_NODE );	CheckStatsNode ( stats,	1,		1,		Node::ALIAS_NODE );	CheckStatsTotal( stats,	7,		4 );}
开发者ID:Samana,项目名称:fastbuild,代码行数:17,


示例14: EnsureFileDoesNotExist

// TestCompile//------------------------------------------------------------------------------void TestUnity::TestCompile() const{	FBuildOptions options;	options.m_ForceCleanBuild = true;	options.m_ShowSummary = true; // required to generate stats for node count checks	EnsureFileDoesNotExist( "../../../../tmp/Test/Unity/Unity.lib" );	FBuildStats stats = BuildCompile( options, false ); // don't use DB	EnsureFileExists( "../../../../tmp/Test/Unity/Unity.lib" );	// Check stats	//						Seen,	Built,	Type    uint32_t numF = 9; // pch + 2x generated unity files + 6 source cpp files    #if defined( __WINDOWS__ )        numF++; // pch.cpp    #endif    	CheckStatsNode ( stats,	1,		1,		Node::DIRECTORY_LIST_NODE );	CheckStatsNode ( stats,	1,		1,		Node::UNITY_NODE );	CheckStatsNode ( stats,	numF,	3,		Node::FILE_NODE ); // pch + 2x generated unity files built	CheckStatsNode ( stats,	1,		1,		Node::COMPILER_NODE );	CheckStatsNode ( stats,	3,		3,		Node::OBJECT_NODE );	CheckStatsNode ( stats,	1,		1,		Node::LIBRARY_NODE );	CheckStatsNode ( stats,	1,		1,		Node::ALIAS_NODE );	CheckStatsTotal( stats,	8+numF,	11 );}
开发者ID:poppolopoppo,项目名称:fastbuild,代码行数:29,


示例15: fBuild

// BuildResource_NoRebuild//------------------------------------------------------------------------------void TestResources::BuildResource_NoRebuild() const{	FBuildOptions options;	options.m_ConfigFile = "Data/TestResources/fbuild.bff";	options.m_ShowSummary = true; // required to generate stats for node count checks	FBuild fBuild( options );	fBuild.Initialize( "..//..//..//..//ftmp//Test//Resources//resource.fdb" );	TEST_ASSERT( fBuild.Build( AStackString<>( "exe" ) ) );	// Check stats	//				 Seen,	Built,	Type	// NOTE: Don't test file nodes since test used windows.h	CheckStatsNode ( 2,		0,		Node::OBJECT_NODE );	CheckStatsNode ( 1,		0,		Node::OBJECT_LIST_NODE );	CheckStatsNode ( 1,		0,		Node::LIBRARY_NODE );	CheckStatsNode ( 1,		1,		Node::ALIAS_NODE );	CheckStatsNode ( 1,		0,		Node::EXE_NODE );}
开发者ID:scott-nelson,项目名称:fastbuild,代码行数:22,



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


C++ CheckStatsTotal函数代码示例
C++ CheckState函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。