Home
last modified time | relevance | path

Searched refs:tokens (Results 1 – 25 of 30) sorted by relevance

12

/cts/hostsidetests/car/app/src/android/car/cts/app/
DPowerPolicyTestClient.java93 String[] tokens = cmdStr.split(","); in parseCommand() local
94 assertNumberOfArgs(tokens); in parseCommand()
95 switch (tokens[0]) { in parseCommand()
97 cmd = new PowerPolicyTestCommand.SetTestCommand(this, tokens[1]); in parseCommand()
106 cmd = new PowerPolicyTestCommand.AddListenerCommand(this, tokens[1]); in parseCommand()
109 cmd = new PowerPolicyTestCommand.RemoveListenerCommand(this, tokens[1]); in parseCommand()
112 cmd = new PowerPolicyTestCommand.DumpListenerCommand(this, tokens[1]); in parseCommand()
195 private void assertNumberOfArgs(String[] tokens) { in assertNumberOfArgs() argument
196 if (tokens.length < 1) { in assertNumberOfArgs()
201 switch (tokens[0]) { in assertNumberOfArgs()
[all …]
DCarPowerTestService.java248 String[] tokens = commandString.split(","); in parseCommandAndExecute() local
249 switch(tokens[0]) { in parseCommandAndExecute()
251 if (tokens.length != 3) { in parseCommandAndExecute()
258 String completionType = tokens[1]; in parseCommandAndExecute()
268 String suspendType = tokens[2]; in parseCommandAndExecute()
288 if (tokens.length != 3) { in parseCommandAndExecute()
304 completionType = tokens[1]; in parseCommandAndExecute()
313 suspendType = tokens[2]; in parseCommandAndExecute()
/cts/hostsidetests/securitybulletin/src/android/security/cts/
DCVE_2021_39707.java51 String[] tokens = commandOutput.split("\\s+"); in testPocCVE_2021_39707() local
52 assumeTrue(tokens.length > 0); in testPocCVE_2021_39707()
53 assumeTrue(tokens[0].equals("Success:")); in testPocCVE_2021_39707()
54 userId = Integer.parseInt(tokens[tokens.length - 1]); in testPocCVE_2021_39707()
DCVE_2022_20223.java51 String[] tokens = commandOutput.split("\\s+"); in testPocCVE_2022_20223() local
52 assumeTrue(tokens.length > 0); in testPocCVE_2022_20223()
53 assumeTrue(tokens[0].equals("Success:")); in testPocCVE_2022_20223()
54 userId = Integer.parseInt(tokens[tokens.length - 1]); in testPocCVE_2022_20223()
/cts/tests/tests/text/src/android/text/util/cts/
DRfc822TokenizerTest.java131 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(""); in testTokenize() local
132 assertEquals(0, tokens.length); in testTokenize()
135 tokens = Rfc822Tokenizer.tokenize(text); in testTokenize()
136 assertEquals(2, tokens.length); in testTokenize()
137 verifyLocalAssertEquals(tokens[0], "Berg", "berg\\@example.com", "home"); in testTokenize()
138 verifyLocalAssertEquals(tokens[1], null, "tom\\@example.com", "work"); in testTokenize()
141 tokens = Rfc822Tokenizer.tokenize(text); in testTokenize()
142 assertEquals(2, tokens.length); in testTokenize()
143 verifyLocalAssertEquals(tokens[0], "Foo Bar", "foo\\@example.com", "something"); in testTokenize()
144 verifyLocalAssertEquals(tokens[1], null, "blah\\@example.com", "something"); in testTokenize()
/cts/tools/release-parser/src/com/android/cts/releaseparser/
DTestSuiteTradefedParser.java161 String[] tokens = ln.split(" = "); in parseFile() local
162 switch (tokens[0]) { in parseFile()
164 mBuildNumber = tokens[1]; in parseFile()
167 mTargetArch = tokens[1]; in parseFile()
170 mName = tokens[1]; in parseFile()
173 mFullname = tokens[1]; in parseFile()
176 mVersion = tokens[1]; in parseFile()
/cts/hostsidetests/media/src/android/media/cts/
DBaseMultiUserTest.java169 String[] tokens = commandOutput.split("\\s+"); in createAndStartUser() local
170 assertTrue(tokens.length > 0); in createAndStartUser()
171 assertEquals("Success:", tokens[0]); in createAndStartUser()
172 int userId = Integer.parseInt(tokens[tokens.length-1]); in createAndStartUser()
309 String[] tokens = feature.split(":"); in hasDeviceFeature() local
312 tokens.length > 1); in hasDeviceFeature()
313 assertEquals(feature, "feature", tokens[0]); in hasDeviceFeature()
314 mAvailableFeatures.add(tokens[1]); in hasDeviceFeature()
/cts/hostsidetests/car/src/android/car/cts/powerpolicy/
DSilentModeInfo.java82 String[] tokens = lines[idx].trim().split(":"); in parse() local
83 if (tokens.length != 2) { in parse()
88 String hdr = tokens[0]; in parse()
89 String val = tokens[1]; in parse()
DPowerPolicyTestAnalyzer.java85 String[] tokens = line.split("##"); in parseAndAddTestEntry() local
86 if (tokens.length != 2) { in parseAndAddTestEntry()
89 String header = tokens[0].trim(); in parseAndAddTestEntry()
90 String data = tokens[1].trim(); in parseAndAddTestEntry()
DPowerPolicyGroups.java153 String[] tokens = defStr.trim().split("(\\s*)(-{1,2})(>?)(\\s*)"); in parsePolicyGroupDef() local
154 if (tokens.length != 3) { in parsePolicyGroupDef()
158 if (!stateName.equals(tokens[1].trim())) { in parsePolicyGroupDef()
160 stateName, tokens[1]); in parsePolicyGroupDef()
164 return tokens[2].trim(); in parsePolicyGroupDef()
DPowerPolicyDef.java98 StringTokenizer tokens = new StringTokenizer(policyDefStr, "():"); in parse() local
100 ? tokens.nextToken().trim().substring(offset).trim() : IdSet.NONE; in parse()
102 if (!search(ENABLED_HEADERS, tokens.nextToken().trim())) { in parse()
109 String tmpStr = tokens.nextToken().trim(); in parse()
128 tmpStr = tokens.nextToken().trim(); in parse()
/cts/hostsidetests/apex/src/android/apex/cts/
DApexTest.java93 String[] tokens = mountInfoLine.split(" "); in MountEntry() local
94 if (tokens.length < 5) { in MountEntry()
97 mountId = Integer.parseInt(tokens[0]); in MountEntry()
98 mountPoint = tokens[4]; in MountEntry()
/cts/tests/tests/jni/src/android/jni/cts/
DLinkerNamespacesHelper.java125 String[] tokens = line.split(" "); in readPublicLibrariesFile() local
126 if (tokens.length < 1 || tokens.length > 3) { in readPublicLibrariesFile()
129 String soname = tokens[0]; in readPublicLibrariesFile()
131 int i = tokens.length; in readPublicLibrariesFile()
133 if (tokens[i].equals("nopreload")) { in readPublicLibrariesFile()
136 else if (tokens[i].equals("32") || tokens[i].equals("64")) { in readPublicLibrariesFile()
141 bitness = tokens[i].equals("32") ? Bitness.ONLY_32 : Bitness.ONLY_64; in readPublicLibrariesFile()
143 throw new RuntimeException("Unrecognized token '" + tokens[i] + in readPublicLibrariesFile()
/cts/hostsidetests/packagemanager/multiuser/src/com/android/tests/packagemanager/multiuser/host/
DPackageManagerMultiUserTestBase.java106 String[] tokens = commandOutput.split("\\s+"); in createUser() local
107 assertTrue(commandOutput, tokens.length > 0); in createUser()
108 assertEquals(commandOutput, "Success:", tokens[0]); in createUser()
109 int userId = Integer.parseInt(tokens[tokens.length - 1]); in createUser()
/cts/hostsidetests/tv/src/com/android/cts/tv/
DTvInputManagerHostTest.java141 String[] tokens = feature.split(":"); in hasDeviceFeature() local
143 tokens.length > 1); in hasDeviceFeature()
144 assertEquals(feature, "feature", tokens[0]); in hasDeviceFeature()
145 mAvailableFeatures.add(tokens[1]); in hasDeviceFeature()
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DBaseDevicePolicyTest.java444 String[] tokens = lines[i].split("\\{|\\}|:"); in getUserFlags() local
446 tokens.length == 4 || tokens.length == 5); in getUserFlags()
448 if (Integer.parseInt(tokens[1]) == userId) { in getUserFlags()
449 return Integer.parseInt(tokens[3], 16); in getUserFlags()
681 String[] tokens = commandOutput.split("\\s+"); in createUser() local
682 assertTrue(tokens.length > 0); in createUser()
683 assertEquals("Command '" + command + "' failed: " + commandOutput, "Success:", tokens[0]); in createUser()
684 return Integer.parseInt(tokens[tokens.length-1]); in createUser()
790 String[] tokens = commandOutput.split("\\s+"); in getUserIdFromCreateUserCommandOutput() local
792 tokens.length > 0); in getUserIdFromCreateUserCommandOutput()
[all …]
/cts/hostsidetests/edi/src/android/edi/cts/
DNativeDeviceInfo.java37 String[] tokens = commandResult.getStdout().split("\\s+"); in collectMemCG() local
38 boolean memcg_enabled = tokens[3].equals("1"); in collectMemCG()
40 if (memcg_enabled) store.addResult("version", tokens[1].equals("0") ? "2" : "1"); in collectMemCG()
/cts/hostsidetests/appcloning/hostside/src/com/android/cts/appcloning/contacts/
DManagedProfileContactsAccessTest.java143 String[] tokens = commandOutput.split("\\s+"); in getUserIdFromCreateUserCommandOutput() local
145 .that(tokens.length > 0).isTrue(); in getUserIdFromCreateUserCommandOutput()
147 .that("Success:").isEqualTo(tokens[0]); in getUserIdFromCreateUserCommandOutput()
148 return Integer.parseInt(tokens[tokens.length - 1]); in getUserIdFromCreateUserCommandOutput()
/cts/hostsidetests/angle/src/android/angle/cts/
DCtsAngleCommon.java196 String[] tokens = line.split(" "); in getDumpsysGpuAngleInUse() local
197 if (tokens.length != 3) { in getDumpsysGpuAngleInUse()
199 "Malformed result: tokens.length = " + tokens.length); in getDumpsysGpuAngleInUse()
202 return Integer.parseInt(tokens[2]); in getDumpsysGpuAngleInUse()
/cts/hostsidetests/settings/src/com/google/android/cts/settings/
DPrivacyDeviceOwnerTest.java249 String[] tokens = feature.split(":"); in hasDeviceFeature() local
252 tokens.length > 1); in hasDeviceFeature()
253 assertEquals(feature, "feature", tokens[0]); in hasDeviceFeature()
254 availableFeatures.add(tokens[1]); in hasDeviceFeature()
/cts/hostsidetests/webkit/src/com/android/cts/webkit/
DWebViewHostSideMultipleProfileTest.java133 String[] tokens = output.getStdout().split("\\s+"); in createUser() local
134 return Integer.parseInt(tokens[tokens.length - 1]); in createUser()
/cts/tests/tests/text/src/android/text/method/cts/
DEditorState.java88 final String[] tokens = string.split(" +"); in setByString() local
89 for (String token : tokens) { in setByString()
/cts/tests/tests/media/bettertogether/src/android/media/bettertogether/cts/
DMediaSession2ServiceTest.java206 final List<Session2Token> tokens = new ArrayList<>(); in testOnGetSession_returnsDifferentSessions() local
212 tokens.add(session.getToken()); in testOnGetSession_returnsDifferentSessions()
224 assertThat(tokens).hasSize(2); in testOnGetSession_returnsDifferentSessions()
225 assertThat(controller1.getConnectedToken()).isEqualTo(tokens.get(0)); in testOnGetSession_returnsDifferentSessions()
226 assertThat(controller2.getConnectedToken()).isEqualTo(tokens.get(1)); in testOnGetSession_returnsDifferentSessions()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DResumeOnRebootHostTest.java539 String[] tokens = commandOutput.split("\\s+"); in getUserIdFromCreateUserCommandOutput() local
541 tokens.length, greaterThan(0)); in getUserIdFromCreateUserCommandOutput()
542 assertThat("Command output should start with \"Success\"" + commandOutput, tokens[0], in getUserIdFromCreateUserCommandOutput()
544 return Integer.parseInt(tokens[tokens.length - 1]); in getUserIdFromCreateUserCommandOutput()
/cts/tools/cts-tradefed/tests/src/com/android/compatibility/common/tradefed/loading/
DCommonConfigLoadingTest.java280 private void checkTokens(String configName, List<String> tokens) throws ConfigurationException { in checkTokens() argument
281 if (tokens == null) { in checkTokens()
284 for (String token : tokens) { in checkTokens()

12