/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/ |
D | RangeSpecificationTest.java | 42 assertThat(parse("0").toString()).isEqualTo("0"); in testParse() 43 assertThat(parse("0").length()).isEqualTo(1); in testParse() 44 assertThat(parse("01234").toString()).isEqualTo("01234"); in testParse() 45 assertThat(parse("01234").length()).isEqualTo(5); in testParse() 46 assertThat(parse("012[0-9]").toString()).isEqualTo("012x"); in testParse() 47 assertThat(parse("012[0234789]xxx").toString()).isEqualTo("012[02-47-9]xxx"); in testParse() 48 assertThat(parse("0_1_2").toString()).isEqualTo("012"); in testParse() 49 assertThat(parse("0_12[3-8]_xxx_xxx").toString()).isEqualTo("012[3-8]xxxxxx"); in testParse() 76 .isEqualTo(parse("[0-2457-9]")); in testSingleton() 98 assertThat(parse("123xxx").min()).isEqualTo(DigitSequence.of("123000")); in testMinMax() [all …]
|
D | DigitSequenceTest.java | 33 assertThat(DigitSequence.empty().length()).isEqualTo(0); in testEmpty() 35 assertThat(DigitSequence.empty().toString()).isEqualTo(""); in testEmpty() 41 assertThat(s).isEqualTo(DigitSequence.of("0123456789")); in testCreate() 48 assertThat(s.length()).isEqualTo(10); in testGetDigit() 50 assertThat(s.getDigit(n)).isEqualTo(n); in testGetDigit() 52 assertThat(s.toString()).isEqualTo("0123456789"); in testGetDigit() 65 assertThat(domain().minValue()).isEqualTo(DigitSequence.empty()); in testMin() 73 assertThat(domain().maxValue()).isEqualTo(max); in testMax() 81 .isEqualTo(1); in testDistance() 83 .isEqualTo(1); in testDistance() [all …]
|
D | RangeTreeTest.java | 133 assertThat(a.union(a)).isEqualTo(a); in testUnion() 134 assertThat(a.union(RangeTree.empty())).isEqualTo(a); in testUnion() 135 assertThat(RangeTree.empty().union(a)).isEqualTo(a); in testUnion() 145 assertThat(a.intersect(a)).isEqualTo(a); in testIntersection() 158 assertThat(a.subtract(RangeTree.empty())).isEqualTo(a); in testSubtraction() 205 assertThat(subAB.union(intAB)).isEqualTo(a); in testVennDiagram() 206 assertThat(subBA.union(intAB)).isEqualTo(b); in testVennDiagram() 207 assertThat(subAB.union(subBA).union(intAB)).isEqualTo(a.union(b)); in testVennDiagram() 237 assertThat(r.asRangeSet()).isEqualTo(rangeSetOf(range("123", "45678"))); in testComplexSpecsToSimpleRange() 244 assertThat(r.asRangeSet()).isEqualTo(rangeSetOf( in testAsRangeSetMultipleGroups() [all …]
|
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/table/ |
D | ColumnTest.java | 37 assertThat(column.getName()).isEqualTo("bool"); in testBooleanColumn() 38 assertThat(column.type()).isEqualTo(Boolean.class); in testBooleanColumn() 46 assertThat(column.serialize(TRUE)).isEqualTo("true"); in testBooleanColumn() 47 assertThat(column.serialize(FALSE)).isEqualTo("false"); in testBooleanColumn() 57 assertThat(column.getName()).isEqualTo("string"); in testStringColumn() 58 assertThat(column.type()).isEqualTo(String.class); in testStringColumn() 59 assertThat(column.cast("hello")).isEqualTo("hello"); in testStringColumn() 63 assertThat(column.parse("world")).isEqualTo("world"); in testStringColumn() 64 assertThat(column.serialize("world")).isEqualTo("world"); in testStringColumn() 66 assertThat(column.parse(" world ")).isEqualTo("world"); in testStringColumn() [all …]
|
D | SchemaTest.java | 59 assertThat(SCHEMA.getColumn("Type")).isEqualTo(TYPE); in test() 60 assertThat(SCHEMA.getColumn("Region:US")).isEqualTo(REGION_US); in test() 67 assertThat(SCHEMA.checkColumn(TYPE)).isEqualTo(TYPE); in testCheckColumn() 68 assertThat(SCHEMA.checkColumn(REGION_US)).isEqualTo(REGION_US); in testCheckColumn()
|
D | RangeTableTest.java | 83 assertThat(table.getRanges(TYPE, MOBILE)).isEqualTo(ranges("1[234]xxxx")); in testBasicAssign() 86 assertThat(table.getRanges(TYPE, MOBILE)).isEqualTo(ranges("1[24]xxxx")); in testBasicAssign() 92 assertThat(table.getRanges(TYPE, MOBILE)).isEqualTo(ranges("12xxxx")); in testBasicAssign() 93 assertThat(table.getRanges(TYPE, FIXED_LINE)).isEqualTo(ranges("14xxxx")); in testBasicAssign() 97 assertThat(table.getRanges(TYPE, MOBILE)).isEqualTo(ranges("12xxxx")); in testBasicAssign() 98 assertThat(table.getRanges(TYPE, FIXED_LINE)).isEqualTo(ranges("1[34]xxxx")); in testBasicAssign() 106 assertThat(table.getRanges(TYPE, MOBILE)).isEqualTo(ranges("12xxxx")); in testBasicAssign() 107 assertThat(table.getRanges(TYPE, FIXED_LINE)).isEqualTo(ranges("1[3-5]xxxx")); in testBasicAssign() 213 assertThat(imported).isEqualTo(original); in testTableImportExport() 214 assertThat(imported.toImmutableTable()).isEqualTo(exported); in testTableImportExport()
|
D | ColumnGroupTest.java | 35 assertThat(us.getName()).isEqualTo("Region:US"); in testGroupColumns() 36 assertThat(us.type()).isEqualTo(Boolean.class); in testGroupColumns() 39 assertThat(ca.getName()).isEqualTo("Region:CA"); in testGroupColumns()
|
D | CsvTableTest.java | 87 assertThat(toRangeTable(csv)).isEqualTo(table); in testRangeTableExport() 103 assertThat(ExamplesTableSchema.toExampleTable(csv)).isEqualTo(table); in testExampleNumberExport() 180 assertThat(toRangeTable(csv)).isEqualTo(table); in testOrdering() 242 assertThat(exported).isEqualTo(aligned); in assertCsv() 243 assertThat(export(csv, false)).isEqualTo(unaligned); in assertCsv() 245 assertThat(csv).isEqualTo(imported); in assertCsv()
|
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/regex/ |
D | EdgeWriterTest.java | 45 assertThat(regex(e("0"))).isEqualTo("0"); in testSimple() 46 assertThat(regex(e("[0-7]"))).isEqualTo("[0-7]"); in testSimple() 47 assertThat(regex(e("[0-9]"))).isEqualTo("\\d"); in testSimple() 48 assertThat(regex(X)).isEqualTo("\\d"); in testSimple() 53 assertThat(regex(seq(e("0"), e("1"), e("2")))).isEqualTo("012"); in testSequences() 59 assertThat(regex(or(e("0"), e("1"), e("2")))).isEqualTo("0|1|2"); in testGroups() 61 assertThat(regex(opt(e("0"), e("1"), e("2")))).isEqualTo("(?:0|1|2)?"); in testGroups() 67 .isEqualTo("(?:0|1)2"); in testGroups() 83 .isEqualTo("0(?:1|2(?:3|4)?)56"); in testNesting() 89 assertThat(regex(seq(e("0"), e("1"), X))).isEqualTo("01\\d"); in testAnyDigitSequences() [all …]
|
D | AnyPathTest.java | 40 assertThat(EMPTY.extend(false)).isEqualTo(SINGLE); in testExtend() 41 assertThat(EMPTY.extend(true)).isEqualTo(OPTIONAL); in testExtend() 54 assertThat(EMPTY.join(SINGLE)).isEqualTo(SINGLE); in testJoin() 55 assertThat(EMPTY.join(OPTIONAL)).isEqualTo(OPTIONAL); in testJoin() 62 assertThat(AnyPath.of(0x7).join(AnyPath.of(0x7))).isEqualTo(AnyPath.of(0x1F)); in testJoin() 67 assertThat(AnyPath.of(0xC).join(AnyPath.of(0x5))).isEqualTo(AnyPath.of(0x3C)); in testJoin() 72 assertThat(OPTIONAL.makeOptional()).isEqualTo(OPTIONAL); in testMakeOptional() 73 assertThat(SINGLE.makeOptional()).isEqualTo(OPTIONAL); in testMakeOptional() 79 assertThat(SINGLE.toString()).isEqualTo("x"); in testToString() 80 assertThat(OPTIONAL.toString()).isEqualTo("(x)?"); in testToString() [all …]
|
D | EdgeTest.java | 39 assertThat(Edge.fromMask(0x6).getDigitMask()).isEqualTo(0x6); in testSimple() 42 assertThat(Edge.fromMask(0x3).toString()).isEqualTo("[01]"); // 0000000011 in testSimple() 43 assertThat(Edge.fromMask(0x300).toString()).isEqualTo("[89]"); // 1100000000 in testSimple() 44 assertThat(Edge.fromMask(0x1FE).toString()).isEqualTo("[1-8]"); // 0111111110 in testSimple() 45 assertThat(Edge.fromMask(ALL_DIGITS_MASK).toString()).isEqualTo("x"); // any digit in testSimple() 50 assertThat(Edge.fromMask(ALL_DIGITS_MASK)).isEqualTo(Edge.any()); in testAny() 51 assertThat(Edge.any().optional()).isEqualTo(Edge.optionalAny()); in testAny() 53 assertThat(Edge.any().toString()).isEqualTo("x"); in testAny() 55 assertThat(Edge.optionalAny().toString()).isEqualTo("x?"); in testAny() 62 assertThat(Edge.epsilon().toString()).isEqualTo("e"); in testEpsilon() [all …]
|
D | NfaFlattenerTest.java | 45 assertThat(flat).isEqualTo(seq(e("1"), e("2"))); in testSimple() 46 assertThat(flat.toString()).isEqualTo("12"); in testSimple() 50 assertThat(flat).isEqualTo( in testSimple() 54 assertThat(flat.toString()).isEqualTo("(12|34)"); in testSimple() 66 assertThat(flat).isEqualTo( in testSubgroup() 73 assertThat(flat.toString()).isEqualTo("12(34|56)78"); in testSubgroup() 92 assertThat(flat).isEqualTo( in testSubgroupWithEarlyJoining() 106 assertThat(flat.toString()).isEqualTo("0(((12|3)4|5)6|7)8"); in testSubgroupWithEarlyJoining() 124 assertThat(flat).isEqualTo( in testPathDuplication() 130 assertThat(flat.toString()).isEqualTo("0(12|34)5"); in testPathDuplication() [all …]
|
D | RegexFormatterTest.java | 38 .isEqualTo("abcd"); in testSimple() 43 assertThat(RegexFormatter.format("ab(cd|ef)gh", PRESERVE_CAPTURING_GROUPS)).isEqualTo(lines( in testNested() 49 assertThat(RegexFormatter.format("ab(?:cd|ef)gh", PRESERVE_CAPTURING_GROUPS)).isEqualTo(lines( in testNested() 59 .isEqualTo(lines( in testDoubleNested() 69 .isEqualTo(lines( in testDoubleNested() 82 .isEqualTo(lines( in testForceNonCapturingGroups() 94 assertThat(RegexFormatter.format("ab(?:cd(ef|gh)|ij)", FORCE_CAPTURING_GROUPS)).isEqualTo(lines( in testForceCapturingGroups()
|
D | RangeTreeConverterTest.java | 50 assertThat(node).isEqualTo(TERMINAL); in testSimple() 64 assertThat(node).isEqualTo(TERMINAL); in testWithOptionalEdge() 78 assertThat(follow(nfa, node, epsilon())).isEqualTo(Node.TERMINAL); in testWithEpsilon() 82 assertThat(node).isEqualTo(TERMINAL); in testWithEpsilon() 100 assertThat(lhs).isEqualTo(rhs); in testMultiplePathsWithCommonTail() 102 assertThat(node).isEqualTo(TERMINAL); in testMultiplePathsWithCommonTail() 114 assertThat(follow(nfa, INITIAL, epsilon())).isEqualTo(Node.TERMINAL); in testOptionalTopLevelGroup_bug_69101586() 117 assertThat(node).isEqualTo(TERMINAL); in testOptionalTopLevelGroup_bug_69101586() 133 assertThat(nfa.edgeValue(node, target).get()).isEqualTo(edge); in assertOutEdge()
|
D | NodeTest.java | 31 assertThat(INITIAL.id()).isEqualTo(0); in testConstants() 32 assertThat(TERMINAL.id()).isEqualTo(1); in testConstants() 40 assertThat(TERMINAL.createNext().id()).isEqualTo(2); in testNext() 43 assertThat(node.id()).isEqualTo(id); in testNext() 52 assertThat(node.toString()).isEqualTo(Integer.toString(id)); in testToString()
|
/third_party/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/localedistance/ |
D | PartitionInfoTest.java | 72 assertThat(lookup[LSR.indexForRegion("CA")]).isEqualTo(1); in testPartitionInfo() 73 assertThat(lookup[LSR.indexForRegion("VI")]).isEqualTo(1); in testPartitionInfo() 74 assertThat(lookup[LSR.indexForRegion("DE")]).isEqualTo(2); in testPartitionInfo() 75 assertThat(lookup[LSR.indexForRegion("FR")]).isEqualTo(2); in testPartitionInfo() 76 assertThat(lookup[LSR.indexForRegion("GB")]).isEqualTo(3); in testPartitionInfo() 77 assertThat(lookup[LSR.indexForRegion("PR")]).isEqualTo(4); in testPartitionInfo() 78 assertThat(lookup[LSR.indexForRegion("US")]).isEqualTo(4); in testPartitionInfo() 79 assertThat(lookup[LSR.indexForRegion("001")]).isEqualTo(5); in testPartitionInfo() 80 assertThat(lookup[LSR.indexForRegion("003")]).isEqualTo(6); in testPartitionInfo() 81 assertThat(lookup[LSR.indexForRegion("019")]).isEqualTo(6); in testPartitionInfo() [all …]
|
D | IndexerTest.java | 15 assertThat(indexer.apply("foo")).isEqualTo(0); in testSimple() 16 assertThat(indexer.apply("bar")).isEqualTo(1); in testSimple() 17 assertThat(indexer.apply("baz")).isEqualTo(2); in testSimple() 18 assertThat(indexer.apply("foo")).isEqualTo(0); in testSimple() 25 assertThat(indexer.apply("foo")).isEqualTo("ONE"); in testWithTransform() 26 assertThat(indexer.apply("bar")).isEqualTo("TWO"); in testWithTransform() 27 assertThat(indexer.apply("baz")).isEqualTo("THREE"); in testWithTransform() 28 assertThat(indexer.apply("foo")).isEqualTo("ONE"); in testWithTransform()
|
/third_party/protobuf/java/util/src/test/java/com/google/protobuf/util/ |
D | ValuesTest.java | 46 .isEqualTo(Value.newBuilder().setNullValue(NullValue.NULL_VALUE).build()); in testOfNull_IsNullValue() 50 assertThat(Values.of(true)).isEqualTo(Value.newBuilder().setBoolValue(true).build()); in testOfBoolean_ConstructsValue() 51 assertThat(Values.of(false)).isEqualTo(Value.newBuilder().setBoolValue(false).build()); in testOfBoolean_ConstructsValue() 55 assertThat(Values.of(100)).isEqualTo(Value.newBuilder().setNumberValue(100).build()); in testOfNumeric_ConstructsValue() 56 assertThat(Values.of(1000L)).isEqualTo(Value.newBuilder().setNumberValue(1000).build()); in testOfNumeric_ConstructsValue() 57 assertThat(Values.of(1000.23f)).isEqualTo(Value.newBuilder().setNumberValue(1000.23f).build()); in testOfNumeric_ConstructsValue() 58 assertThat(Values.of(10000.23)).isEqualTo(Value.newBuilder().setNumberValue(10000.23).build()); in testOfNumeric_ConstructsValue() 62 assertThat(Values.of("")).isEqualTo(Value.newBuilder().setStringValue("").build()); in testOfString_ConstructsValue() 63 assertThat(Values.of("foo")).isEqualTo(Value.newBuilder().setStringValue("foo").build()); in testOfString_ConstructsValue() 72 .isEqualTo(Value.newBuilder().setStructValue(builder.build()).build()); in testOfStruct_ConstructsValue() [all …]
|
D | StructsTest.java | 43 assertThat(Structs.of("k1", Values.of(1))).isEqualTo(expected.build()); in test1pair_constructsObject() 49 assertThat(Structs.of("k1", Values.of(1), "k2", Values.of(2))).isEqualTo(expected.build()); in test2pair_constructsObject() 56 .isEqualTo(expected.build()); in test3pair_constructsObject()
|
/third_party/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/ |
D | SupplementalDataTest.java | 57 assertThat(fakeData.getParent("en_GB")).isEqualTo("en_001"); in testGetParent_explicit() 58 assertThat(fakeData.getParent("en_AU")).isEqualTo("en_001"); in testGetParent_explicit() 59 assertThat(fakeData.getParent("en_001")).isEqualTo("en"); in testGetParent_explicit() 60 assertThat(fakeData.getParent("en_US")).isEqualTo("en"); in testGetParent_explicit() 61 assertThat(fakeData.getParent("en")).isEqualTo("root"); in testGetParent_explicit() 71 assertThat(fakeData.getParent("zh_Hant")).isEqualTo("root"); in testGetParent_likelyScript() 73 assertThat(fakeData.getParent("zh_Hans")).isEqualTo("zh"); in testGetParent_likelyScript() 98 assertThat(fakeData.replaceDeprecatedTags("root")).isEqualTo("root"); in testReplaceDeprecatedTags_iAmRoot() 106 assertThat(fakeData.replaceDeprecatedTags("en_Latn_GB")).isEqualTo("en_Latn_GB"); in testReplaceDeprecatedTags_sameSubtags() 107 assertThat(fakeData.replaceDeprecatedTags("en_GB")).isEqualTo("en_GB"); in testReplaceDeprecatedTags_sameSubtags() [all …]
|
D | RbPathTest.java | 43 assertThat(path.length()).isEqualTo(3); in testIteration() 44 assertThat(path.getSegment(0)).isEqualTo("foo"); in testIteration() 45 assertThat(path.getSegment(1)).isEqualTo("bar"); in testIteration() 46 assertThat(path.getSegment(2)).isEqualTo("baz"); in testIteration() 94 assertThat(RbPath.getCommonPrefixLength(p, q)).isEqualTo(2); in testCommonPrefixLength() 95 assertThat(RbPath.getCommonPrefixLength(p, p)).isEqualTo(3); in testCommonPrefixLength() 96 assertThat(RbPath.getCommonPrefixLength(p, RbPath.of())).isEqualTo(0); in testCommonPrefixLength() 98 assertThat(RbPath.getCommonPrefixLength(p, RbPath.of("bar", "baz"))).isEqualTo(0); in testCommonPrefixLength()
|
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/model/ |
D | FormatSpecTest.java | 37 assertThat(national("XX\\XXX").national().skeleton()).isEqualTo("$1X$2"); in testCreate_national() 89 assertThat(t.getXmlCapturingPattern()).isEqualTo("(\\d{3})(\\d{3,5})"); in testTemplate_splitPrefix() 90 assertThat(t.getXmlFormat()).isEqualTo("$1 - $2"); in testTemplate_splitPrefix() 99 assertThat(t.getXmlCapturingPattern()).isEqualTo("(\\d{3})(\\d{2})(\\d{2})"); in testTemplate_noPrefix() 100 assertThat(t.getXmlFormat()).isEqualTo("$1 $2-$3"); in testTemplate_noPrefix() 109 assertThat(t.getXmlCapturingPattern()).isEqualTo("(\\d{3})(\\d{2})(\\d{2})"); in testTemplate_replacementNoNationalPrefix() 110 assertThat(t.getXmlFormat()).isEqualTo("$2-$3"); in testTemplate_replacementNoNationalPrefix() 119 assertThat(t.getXmlCapturingPattern()).isEqualTo("(\\d{3})(\\d{2})(\\d{2})"); in testTemplate_replacementWithNationalPrefix() 120 assertThat(t.getXmlFormat()).isEqualTo("$2-$3"); in testTemplate_replacementWithNationalPrefix() 129 assertThat(t.getXmlCapturingPattern()).isEqualTo("(\\d{3})(\\d{2})(\\d{2})"); in testTemplate_replacementNotFirstGroup() [all …]
|
D | AltFormatSpecTest.java | 38 assertThat(spec.template()).isEqualTo(template); in testSimple() 39 assertThat(spec.prefix()).isEqualTo(prefix); in testSimple() 40 assertThat(spec.parentFormatId()).isEqualTo("foo"); in testSimple() 42 assertThat(spec.specifier()).isEqualTo("123X XXXX"); in testSimple() 73 assertThat(AltFormatSpec.create(t, p, "foo", Optional.empty()).specifier()).isEqualTo(spec); in assertGoodTemplateAndPrefix()
|
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/ |
D | UnknownFieldSetTest.java | 113 assertThat(first).isEqualTo(second); in testFieldBuildersAreReusable() 142 assertThat(lengthDelimited.get(0).toStringUtf8()).isEqualTo("some data"); in testClone_lengthDelimited() 143 assertThat(lengthDelimited.get(1).toStringUtf8()).isEqualTo("some more data"); in testClone_lengthDelimited() 149 assertThat(lengthDelimited2.get(0).toStringUtf8()).isEqualTo("some data"); in testClone_lengthDelimited() 150 assertThat(lengthDelimited2.get(1).toStringUtf8()).isEqualTo("some more data"); in testClone_lengthDelimited() 169 assertThat(fieldSet1).isEqualTo(fieldSet2); in testReuse() 180 assertThat(expected).hasMessageThat().isEqualTo("0 is not a valid field number."); in testAddField_zero() 191 assertThat(expected).hasMessageThat().isEqualTo("-2 is not a valid field number."); in testAddField_negative() 201 assertThat(expected).hasMessageThat().isEqualTo("-28 is not a valid field number."); in testClearField_negative() 212 assertThat(expected).hasMessageThat().isEqualTo("-2 is not a valid field number."); in testMergeField_negative() [all …]
|
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/i18n/ |
D | SimpleLanguageTagTest.java | 29 assertThat(SimpleLanguageTag.of("en").toString()).isEqualTo("en"); in testSimple() 30 assertThat(SimpleLanguageTag.of("zh_Hant").toString()).isEqualTo("zh-Hant"); in testSimple()
|