Lines Matching refs:file

1013 static bool startJavaFile(GeneratedFile* file, const string& directory,  in startJavaFile()  argument
1017 if (!file->start(directory, fileName)) { in startJavaFile()
1020 file->writeNotices(); in startJavaFile()
1022 *file << "package android.renderscript.cts;\n\n"; in startJavaFile()
1024 *file << "import android.renderscript.Allocation;\n"; in startJavaFile()
1025 *file << "import android.renderscript.RSRuntimeException;\n"; in startJavaFile()
1026 *file << "import android.renderscript.Element;\n"; in startJavaFile()
1027 *file << "import android.renderscript.cts.Target;\n\n"; in startJavaFile()
1028 *file << "import java.util.Arrays;\n\n"; in startJavaFile()
1030 *file << "public class " << testName << " extends RSBaseCompute"; in startJavaFile()
1031 file->startBlock(); // The corresponding endBlock() is in finishJavaFile() in startJavaFile()
1032 *file << "\n"; in startJavaFile()
1034 file->indent() << "private ScriptC_" << testName << " script;\n"; in startJavaFile()
1035 file->indent() << "private ScriptC_" << relaxedTestName << " scriptRelaxed;\n\n"; in startJavaFile()
1037 file->indent() << "@Override\n"; in startJavaFile()
1038 file->indent() << "protected void setUp() throws Exception"; in startJavaFile()
1039 file->startBlock(); in startJavaFile()
1041 file->indent() << "super.setUp();\n"; in startJavaFile()
1042 file->indent() << "script = new ScriptC_" << testName << "(mRS);\n"; in startJavaFile()
1043 file->indent() << "scriptRelaxed = new ScriptC_" << relaxedTestName << "(mRS);\n"; in startJavaFile()
1045 file->endBlock(); in startJavaFile()
1046 *file << "\n"; in startJavaFile()
1048 file->indent() << "@Override\n"; in startJavaFile()
1049 file->indent() << "protected void tearDown() throws Exception"; in startJavaFile()
1050 file->startBlock(); in startJavaFile()
1052 file->indent() << "script.destroy();\n"; in startJavaFile()
1053 file->indent() << "scriptRelaxed.destroy();\n"; in startJavaFile()
1054 file->indent() << "super.tearDown();\n"; in startJavaFile()
1056 file->endBlock(); in startJavaFile()
1057 *file << "\n"; in startJavaFile()
1063 static void finishJavaFile(GeneratedFile* file, const Function& function, in finishJavaFile() argument
1065 file->indent() << "public void test" << function.getCapitalizedName() << "()"; in finishJavaFile()
1066 file->startBlock(); in finishJavaFile()
1068 file->indent() << m << "();\n"; in finishJavaFile()
1070 file->endBlock(); in finishJavaFile()
1072 file->endBlock(); in finishJavaFile()
1076 static bool startRsFile(GeneratedFile* file, const string& directory, in startRsFile() argument
1079 if (!file->start(directory, fileName)) { in startRsFile()
1082 file->writeNotices(); in startRsFile()
1084 *file << "#pragma version(1)\n"; in startRsFile()
1085 *file << "#pragma rs java_package_name(android.renderscript.cts)\n\n"; in startRsFile()
1094 GeneratedFile file; in writeRelaxedRsFile() local
1095 if (!file.start(directory, name)) { in writeRelaxedRsFile()
1098 file.writeNotices(); in writeRelaxedRsFile()
1100 file << "#include \"" << testName << ".rs\"\n"; in writeRelaxedRsFile()
1101 file << "#pragma rs_fp_relaxed\n"; in writeRelaxedRsFile()
1102 file.close(); in writeRelaxedRsFile()