Home
last modified time | relevance | path

Searched refs:pattern (Results 1 – 25 of 48) sorted by relevance

12

/cts/tests/tests/transition/src/android/transition/cts/
DPatternPathMotionTest.java34 Path pattern = new Path(); in testStraightPath() local
35 pattern.moveTo(100, 500); in testStraightPath()
36 pattern.lineTo(300, 1000); in testStraightPath()
38 PatternPathMotion pathMotion = new PatternPathMotion(pattern); in testStraightPath()
39 assertPathMatches(pattern, pathMotion.getPatternPath()); in testStraightPath()
50 Path pattern = new Path(); in testCurve() local
51 pattern.addArc(0, 0, 100, 100, 0, 180); in testCurve()
53 PatternPathMotion pathMotion = new PatternPathMotion(pattern); in testCurve()
54 assertPathMatches(pattern, pathMotion.getPatternPath()); in testCurve()
64 Path pattern = new Path(); in testSetPatternPath() local
[all …]
/cts/libs/vogar-expect/src/vogar/
DExpectation.java46 private final Pattern pattern; field in Expectation
57 …public Expectation(Result result, Pattern pattern, Set<String> tags, String description, long bug)… in Expectation() argument
58 if (result == null || description == null || pattern == null) { in Expectation()
60 "result=" + result + " description=" + description + " pattern=" + pattern); in Expectation()
65 this.pattern = pattern; in Expectation()
102 return pattern.matcher(outcome.getOutput()).matches(); in patternMatches()
106 return "Expectation[description=" + description + " pattern=" + pattern.pattern() + "]"; in toString()
DExpectationStore.java192 Pattern pattern = MATCH_ALL_PATTERN; in readExpectation() local
218 pattern = Pattern.compile(reader.nextString(), PATTERN_FLAGS); in readExpectation()
220pattern = Pattern.compile(".*" + Pattern.quote(reader.nextString()) + ".*", PATTERN_FLAGS); in readExpectation()
244 Expectation expectation = new Expectation(result, pattern, tags, description, buganizerBug); in readExpectation()
/cts/hostsidetests/securitybulletin/src/android/security/cts/
DRegexUtils.java32 public static void assertContains(String pattern, String input) throws Exception { in assertContains() argument
33 assertFind(pattern, input, false, false); in assertContains()
36 public static void assertContainsMultiline(String pattern, String input) throws Exception { in assertContainsMultiline() argument
37 assertFind(pattern, input, false, true); in assertContainsMultiline()
40 public static void assertNotContains(String pattern, String input) throws Exception { in assertNotContains() argument
41 assertFind(pattern, input, true, false); in assertNotContains()
44 public static void assertNotContainsMultiline(String pattern, String input) throws Exception { in assertNotContainsMultiline() argument
45 assertFind(pattern, input, true, true); in assertNotContainsMultiline()
49 String pattern, String input, boolean shouldFind, boolean multiline) { in assertFind() argument
57 pattern, Pattern.DOTALL|Pattern.MULTILINE).matcher(timedInput); in assertFind()
[all …]
DSecurityTestCase.java98 public void assertMatches(String pattern, String input) throws Exception { in assertMatches() argument
99 RegexUtils.assertContains(pattern, input); in assertMatches()
103 public void assertMatchesMultiLine(String pattern, String input) throws Exception { in assertMatchesMultiLine() argument
104 RegexUtils.assertContainsMultiline(pattern, input); in assertMatchesMultiLine()
108 public void assertNotMatches(String pattern, String input) throws Exception { in assertNotMatches() argument
109 RegexUtils.assertNotContains(pattern, input); in assertNotMatches()
113 public void assertNotMatchesMultiLine(String pattern, String input) throws Exception { in assertNotMatchesMultiLine() argument
114 RegexUtils.assertNotContainsMultiline(pattern, input); in assertNotMatchesMultiLine()
DPoc16_12.java33 String pattern = "nf_conntrack_"; in testPocCVE_2016_8406() local
34 int index = result.indexOf(pattern); in testPocCVE_2016_8406()
38 return result.substring(index + pattern.length()); in testPocCVE_2016_8406()
DPoc17_05.java41 String pattern = "0x"; in testPocCVE_2017_0630()
42 int startIndex = line.indexOf(pattern); in testPocCVE_2017_0630()
46 return line.substring(startIndex + pattern.length()); in testPocCVE_2017_0630()
/cts/apps/CameraITS/tests/scene0/
Dtest_test_patterns.py89 def check_pattern(cap, props, pattern): argument
101 if pattern == 1: # solid color
104 elif pattern == 2: # color bars
112 print 'No specific test for TestPattern %d' % pattern
130 for pattern in PATTERNS:
131 if pattern in avail_patterns:
135 req['android.sensor.testPatternMode'] = pattern
141 its.image.write_image(img, '%s_%d.jpg' % (NAME, pattern), True)
144 assert check_pattern(cap, props, pattern)
/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/
DConsumerIrTest.java80 int[] pattern = {11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999}; in test_timing() local
82 for (int slice : pattern) { in test_timing()
90 mCIR.transmit(range.getMinFrequency(), pattern); in test_timing() local
99 mCIR.transmit(range.getMaxFrequency(), pattern); in test_timing() local
116 int[] pattern = {1901, 4453, 625, 1614, 625, 1588, 625, 1614, 625, 442, 625, 442, 625, in test_transmit() local
123 mCIR.transmit(freqs[0].getMinFrequency(), pattern); in test_transmit()
/cts/hostsidetests/incident/src/com/android/server/cts/
DProtoDumpTestCase.java183 protected Matcher execCommandAndFind(String command, String pattern, int patternFlags) in execCommandAndFind() argument
186 final Matcher matcher = Pattern.compile(pattern, patternFlags).matcher(output); in execCommandAndFind()
187 assertTrue("Pattern '" + pattern + "' didn't match. Output=\n" + output, matcher.find()); in execCommandAndFind()
195 protected Matcher execCommandAndFind(String command, String pattern) throws Exception { in execCommandAndFind() argument
196 return execCommandAndFind(command, pattern, 0); in execCommandAndFind()
203 protected String execCommandAndGetFirstGroup(String command, String pattern) throws Exception { in execCommandAndGetFirstGroup() argument
204 final Matcher matcher = execCommandAndFind(command, pattern); in execCommandAndGetFirstGroup()
205 assertTrue("No group found for pattern '" + pattern + "'", matcher.groupCount() > 0); in execCommandAndGetFirstGroup()
/cts/tests/tests/security/src/android/security/cts/
DBannedFilesTest.java103 private static void assertFileDoesNotContain(String filename, byte[] pattern) { in assertFileDoesNotContain() argument
112 for (int i = 0; i < (fileData.length - pattern.length); i++) { in assertFileDoesNotContain()
113 for (int j = 0; j < pattern.length; j++) { in assertFileDoesNotContain()
114 if (fileData[i+j] != pattern[j]) { in assertFileDoesNotContain()
/cts/hostsidetests/os/src/android/os/cts/
DProcfsHostTests.java129 private void testFile(String absolutePath, String readCommand, Pattern pattern) throws Exception { in testFile() argument
130 String content = readAndCheckFile(absolutePath, readCommand, pattern); in testFile()
137 String newContent = readAndCheckFile(absolutePath, readCommand, pattern); in testFile()
192 private String readAndCheckFile(String absolutePath, String readCommand, Pattern pattern) in readAndCheckFile() argument
199 pattern.matcher(readResult).matches()); in readAndCheckFile()
/cts/hostsidetests/dumpsys/src/android/dumpsys/cts/
DBaseDumpsysTest.java207 protected Matcher execCommandAndFind(String command, String pattern) throws Exception { in execCommandAndFind() argument
211 final Matcher matcher = Pattern.compile(pattern).matcher(output); in execCommandAndFind()
212 assertTrue("Pattern '" + pattern + "' didn't match. Output=\n" + output, matcher.find()); in execCommandAndFind()
220 protected String execCommandAndGetFirstGroup(String command, String pattern) throws Exception { in execCommandAndGetFirstGroup() argument
221 final Matcher matcher = execCommandAndFind(command, pattern); in execCommandAndGetFirstGroup()
222 assertTrue("No group found for pattern '" + pattern + "'", matcher.groupCount() > 0); in execCommandAndGetFirstGroup()
/cts/tests/tests/net/native/qtaguid/src/
DNativeQtaguidTest.cpp50 char pattern[40]; in getCtrlSkInfo() local
51 snprintf(pattern, sizeof(pattern), " tag=0x%" PRIx64 " (uid=%" PRIu32 ")", full_tag, uid); in getCtrlSkInfo()
56 if (strstr(line_buffer, pattern) == NULL) in getCtrlSkInfo()
/cts/tests/tests/os/src/android/os/cts/
DVibratorTest.java58 long[] pattern = {100, 200, 400, 800, 1600}; in testVibratePattern() local
59 mVibrator.vibrate(pattern, 3); in testVibratePattern()
61 mVibrator.vibrate(pattern, 10); in testVibratePattern()
/cts/hostsidetests/backup/src/android/cts/backup/
DBackupPreparer.java128 Pattern pattern = Pattern.compile("^Backup Manager currently (enabled|disabled)$"); in enableBackup() local
129 Matcher matcher = pattern.matcher(output.trim()); in enableBackup()
143 Pattern pattern = Pattern.compile("\\(formerly (.*)\\)$"); in setBackupTransport() local
144 Matcher matcher = pattern.matcher(output); in setBackupTransport()
/cts/tools/utils/cts/
Dtools.py162 def Exclude(self, pattern): argument
173 exp = re.compile(pattern)
178 def Include(self, pattern): argument
188 exp = re.compile(pattern)
/cts/hostsidetests/usb/src/com/android/cts/usb/
DTestUsbTest.java151 Pattern pattern = Pattern.compile("^\\s+iSerial\\s+\\d+\\s+([a-zA-Z0-9]{6,20})", in testUsbSerialReadOnDeviceMatches() local
153 Matcher matcher = pattern.matcher(lsusbOutput); in testUsbSerialReadOnDeviceMatches()
169 pattern = Pattern.compile("^.*CtsUsbSerialTest\\(.*\\):\\s+([a-zA-Z0-9]{6,20})", in testUsbSerialReadOnDeviceMatches()
171 matcher = pattern.matcher(logs); in testUsbSerialReadOnDeviceMatches()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-13253/
Dpoc.cpp66 CryptoPlugin::Pattern pattern = { .mEncryptBlocks = 0, .mSkipBlocks = 1 }; in main() local
76 CryptoPlugin::kMode_Unencrypted, pattern, source, 0, subSamples, 1, in main()
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/
DPropertyDeviceInfo.java46 Pattern pattern = Pattern.compile("\\[(ro.+)\\]: \\[(.+)\\]"); in collectRoProperties() local
53 Matcher matcher = pattern.matcher(line); in collectRoProperties()
/cts/hostsidetests/devicepolicy/app/PasswordComplexity/src/com.android.cts.passwordcomplexity/
DGetPasswordComplexityTest.java131 private void setPattern(String pattern) throws Exception { in setPattern() argument
132 String out = mDevice.executeShellCommand("cmd lock_settings set-pattern " + pattern); in setPattern()
136 mScreenLock = pattern; in setPattern()
/cts/tests/app/src/android/app/cts/
DNotificationChannelTest.java114 final long[] pattern = new long[] {1, 7, 1, 7, 3}; in testVibrationPattern() local
118 channel.setVibrationPattern(pattern); in testVibrationPattern()
119 assertEquals(pattern, channel.getVibrationPattern()); in testVibrationPattern()
/cts/hostsidetests/appsecurity/test-apps/ListeningPortsApp/src/android/appsecurity/cts/listeningports/
DListeningPortsTest.java174 for (String pattern : patterns) { in isPatternMatch()
175 pattern = Pattern.quote(pattern); in isPatternMatch()
176 if (Pattern.matches(pattern, input)) { in isPatternMatch()
/cts/tests/tests/graphics/src/android/graphics/cts/
DDashPathEffectTest.java98 PatternIterator(final float[] pattern, int offset) { in PatternIterator() argument
99 mPattern = pattern; in PatternIterator()
/cts/tests/tests/text/src/android/text/format/cts/
DDateFormatTest.java243 private static void checkFormat(String expected, String pattern, int hour) { in checkFormat() argument
249 SimpleDateFormat sdf = new SimpleDateFormat(pattern); in checkFormat()
252 if (pattern.equals("k") && (hour == 0 || hour == 24)) { in checkFormat()
255 assertEquals("0", DateFormat.format(pattern, c)); in checkFormat()
257 assertEquals(expected, DateFormat.format(pattern, c)); in checkFormat()

12