Lines Matching refs:AStringUtils

27 #include <media/stagefright/foundation/AStringUtils.h>
37 ASSERT_EQ(AStringUtils::Compare("Audio", "AudioExt", 5, false), 0);
38 ASSERT_EQ(AStringUtils::Compare("Audio", "audiOExt", 5, true), 0);
39 ASSERT_NE(AStringUtils::Compare("Audio", "audioExt", 5, false), 0);
40 ASSERT_NE(AStringUtils::Compare("Audio", "AudiOExt", 5, false), 0);
42 ASSERT_LT(AStringUtils::Compare("Audio", "AudioExt", 7, false), 0);
43 ASSERT_LT(AStringUtils::Compare("Audio", "audiOExt", 7, true), 0);
45 ASSERT_GT(AStringUtils::Compare("AudioExt", "Audio", 7, false), 0);
46 ASSERT_GT(AStringUtils::Compare("audiOext", "Audio", 7, true), 0);
48 ASSERT_LT(AStringUtils::Compare("Audio", "Video", 5, false), 0);
49 ASSERT_LT(AStringUtils::Compare("Audio1", "Audio2", 6, false), 0);
50 ASSERT_LT(AStringUtils::Compare("audio", "VIDEO", 5, true), 0);
51 ASSERT_LT(AStringUtils::Compare("audio1", "AUDIO2", 6, true), 0);
53 ASSERT_GT(AStringUtils::Compare("Video", "Audio", 5, false), 0);
54 ASSERT_GT(AStringUtils::Compare("Audio2", "Audio1", 6, false), 0);
55 ASSERT_GT(AStringUtils::Compare("VIDEO", "audio", 5, true), 0);
56 ASSERT_GT(AStringUtils::Compare("AUDIO2", "audio1", 6, true), 0);
58 ASSERT_TRUE(AStringUtils::MatchesGlob("AudioA", 5, "AudioB", 5, false));
59 ASSERT_FALSE(AStringUtils::MatchesGlob("AudioA", 6, "AudioA", 5, false));
60 ASSERT_FALSE(AStringUtils::MatchesGlob("AudioA", 5, "AudioA", 6, false));
61 ASSERT_FALSE(AStringUtils::MatchesGlob("AudioA", 5, "audiOB", 5, false));
62 ASSERT_TRUE(AStringUtils::MatchesGlob("AudioA", 5, "audiOB", 5, true));
63 ASSERT_FALSE(AStringUtils::MatchesGlob("AudioA", 6, "AudioA", 5, true));
64 ASSERT_FALSE(AStringUtils::MatchesGlob("AudioA", 5, "AudioA", 6, true));
66 ASSERT_TRUE(AStringUtils::MatchesGlob("*1", 1, "String8", 6, true));
67 ASSERT_TRUE(AStringUtils::MatchesGlob("*1", 1, "String8", 6, false));
68 ASSERT_TRUE(AStringUtils::MatchesGlob("*1", 1, "String8", 0, true));
69 ASSERT_TRUE(AStringUtils::MatchesGlob("*1", 1, "String8", 0, false));
71 ASSERT_TRUE(AStringUtils::MatchesGlob("*ring1", 5, "String8", 6, false));
72 ASSERT_TRUE(AStringUtils::MatchesGlob("*ring2", 5, "STRING8", 6, true));
73 ASSERT_FALSE(AStringUtils::MatchesGlob("*ring4", 5, "StRing8", 6, false));
74 ASSERT_FALSE(AStringUtils::MatchesGlob("*ring5", 5, "StrinG8", 6, false));
75 ASSERT_FALSE(AStringUtils::MatchesGlob("*ring8", 5, "String8", 7, false));
76 ASSERT_FALSE(AStringUtils::MatchesGlob("*ring8", 5, "String8", 7, true));
78 ASSERT_TRUE(AStringUtils::MatchesGlob("Str*1", 4, "String8", 6, false));
79 ASSERT_TRUE(AStringUtils::MatchesGlob("Str*2", 4, "STRING8", 6, true));
80 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*3", 4, "string8", 6, false));
81 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*4", 4, "StRing8", 6, false));
82 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*5", 4, "AString8", 7, false));
83 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*6", 4, "AString8", 7, true));
85 ASSERT_TRUE(AStringUtils::MatchesGlob("Str*ng1", 6, "String8", 6, false));
86 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng2", 6, "string8", 6, false));
87 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng3", 6, "StRing8", 6, false));
88 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng4", 6, "StriNg8", 6, false));
89 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng5", 6, "StrinG8", 6, false));
90 ASSERT_TRUE(AStringUtils::MatchesGlob("Str*ng6", 6, "STRING8", 6, true));
91 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng8", 6, "AString8", 7, false));
92 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng1", 6, "String16", 7, false));
93 ASSERT_TRUE(AStringUtils::MatchesGlob("Str*ing9", 7, "String8", 6, false));
94 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ringA", 8, "String8", 6, false));
95 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng8", 6, "AString8", 7, true));
96 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ng1", 6, "String16", 7, true));
97 ASSERT_TRUE(AStringUtils::MatchesGlob("Str*ing9", 7, "STRING8", 6, true));
98 ASSERT_FALSE(AStringUtils::MatchesGlob("Str*ringA", 8, "String8", 6, true));
100 ASSERT_TRUE(AStringUtils::MatchesGlob("*str*str1", 8, "bestrestroom", 9, false));
101 ASSERT_TRUE(AStringUtils::MatchesGlob("*str*str1", 8, "bestrestrestroom", 13, false));
102 ASSERT_FALSE(AStringUtils::MatchesGlob("*str*stro", 8, "bestrestrestroom", 14, false));
103 ASSERT_TRUE(AStringUtils::MatchesGlob("*str*str*1", 9, "bestrestrestroom", 14, false));
104 ASSERT_TRUE(AStringUtils::MatchesGlob("*str*str1", 8, "beSTReSTRoom", 9, true));
105 ASSERT_TRUE(AStringUtils::MatchesGlob("*str*str1", 8, "beSTRestreSTRoom", 13, true));
106 ASSERT_FALSE(AStringUtils::MatchesGlob("*str*stro", 8, "bestreSTReSTRoom", 14, true));
107 ASSERT_TRUE(AStringUtils::MatchesGlob("*str*str*1", 9, "bestreSTReSTRoom", 14, true));