/* ================================================================================== Function :isGroupSparse Input :int group < group number > Output :void Return :int < result > Description :is group sparsed? ================================================================================== */ static int isGroupSparse( int group ) { if( group <= 1 ) { return( 1 ); } return( testRoot( group, 3 ) || testRoot( group, 5 ) || testRoot( group, 7 ) ); }
int main(int argc, char *argv[]) { testSequence(); testUnivariateStats(); testBivariateStats(); testUtility(); testVectorAlgebra(); testMatrixDeterminant(); testMatrixInverse(); testLUFactorisation(); testLUSolver(); testGaussianElimination(); testInterpolation(); testIntegration(); testRoot(); testTimeStep(); testRSignificanceTest(); testChiSquared(); testMultipleRegression(); test_golden_fit(); testSimplex(); testSimplex2(); testSimplex3(); test_simplex_fit(); return (EXIT_SUCCESS); }
ParsedAST TestTU::build() const { std::string FullFilename = testPath(Filename), FullHeaderName = testPath(HeaderFilename); std::vector<const char *> Cmd = {"clang", FullFilename.c_str()}; // FIXME: this shouldn't need to be conditional, but it breaks a // GoToDefinition test for some reason (getMacroArgExpandedLocation fails). if (!HeaderCode.empty()) { Cmd.push_back("-include"); Cmd.push_back(FullHeaderName.c_str()); } Cmd.insert(Cmd.end(), ExtraArgs.begin(), ExtraArgs.end()); ParseInputs Inputs; Inputs.CompileCommand.Filename = FullFilename; Inputs.CompileCommand.CommandLine = {Cmd.begin(), Cmd.end()}; Inputs.CompileCommand.Directory = testRoot(); Inputs.Contents = Code; Inputs.FS = buildTestFS({{FullFilename, Code}, {FullHeaderName, HeaderCode}}); Inputs.Opts = ParseOptions(); Inputs.Opts.ClangTidyOpts.Checks = ClangTidyChecks; Inputs.Index = ExternalIndex; if (Inputs.Index) Inputs.Opts.SuggestMissingIncludes = true; auto CI = buildCompilerInvocation(Inputs); assert(CI && "Failed to build compilation invocation."); auto Preamble = buildPreamble(FullFilename, *CI, /*OldPreamble=*/nullptr, /*OldCompileCommand=*/Inputs.CompileCommand, Inputs, /*StoreInMemory=*/true, /*PreambleCallback=*/nullptr); auto AST = buildAST(FullFilename, createInvocationFromCommandLine(Cmd), Inputs, Preamble); if (!AST.hasValue()) { ADD_FAILURE() << "Failed to build code:\n" << Code; llvm_unreachable("Failed to build TestTU!"); } return std::move(*AST); }