/external/mockito/src/test/java/org/mockito/internal/matchers/text/ |
ValuePrinterTest.java | 19 assertThat(print(null)).isEqualTo("null"); 20 assertThat(print("str")).isEqualTo("\"str\""); 21 assertThat(print("x\ny")).isEqualTo("\"x\ny\""); 22 assertThat(print(3)).isEqualTo("3"); 23 assertThat(print(3L)).isEqualTo("3L"); 24 assertThat(print(3.14d)).isEqualTo("3.14d"); 25 assertThat(print(3.14f)).isEqualTo("3.14f"); 26 assertThat(print(new int[]{1, 2})).isEqualTo("[1, 2]"); 29 }})).isEqualTo("{\"foo\" = 2L}"); 38 }})).isEqualTo("{\"int passed as hex\" = 1, \"byte\" = (byte) 0x01, \"short\" = (short) 2, \"int\" = 3, \"long\" (…) [all...] |
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/ |
ResNameTest.java | 12 assertThat(ResName.qualifyResourceName("some.package:type/name", null, null)).isEqualTo("some.package:type/name"); 13 assertThat(ResName.qualifyResourceName("some.package:type/name", "default.package", "deftype")).isEqualTo("some.package:type/name"); 14 assertThat(ResName.qualifyResourceName("*android:type/name", "default.package", "deftype")).isEqualTo("android:type/name"); 15 assertThat(ResName.qualifyResourceName("some.package:name", "default.package", "deftype")).isEqualTo("some.package:deftype/name"); 16 assertThat(ResName.qualifyResourceName("type/name", "default.package", "deftype")).isEqualTo("default.package:type/name"); 17 assertThat(ResName.qualifyResourceName("name", "default.package", "deftype")).isEqualTo("default.package:deftype/name"); 23 .isEqualTo(new ResName("some.package", "type", "name")); 25 .isEqualTo(new ResName("some.package", "default_type", "name")); 27 .isEqualTo(new ResName("default_package", "type", "name")); 29 .isEqualTo(new ResName("default_package", "default_type", "name")) [all...] |
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
ShadowStatFsTest.java | 20 assertThat(statsFs.getBlockCount()).isEqualTo(100); 21 assertThat(statsFs.getFreeBlocks()).isEqualTo(20); 22 assertThat(statsFs.getAvailableBlocks()).isEqualTo(10); 23 assertThat(statsFs.getBlockSize()).isEqualTo(ShadowStatFs.BLOCK_SIZE); 31 assertThat(statsFs.getBlockCount()).isEqualTo(100); 32 assertThat(statsFs.getFreeBlocks()).isEqualTo(20); 33 assertThat(statsFs.getAvailableBlocks()).isEqualTo(10); 34 assertThat(statsFs.getBlockSize()).isEqualTo(ShadowStatFs.BLOCK_SIZE); 46 assertThat(statsFsForTmp.getBlockCount()).isEqualTo(101); 47 assertThat(statsFsForTmp.getFreeBlocks()).isEqualTo(21) [all...] |
ShadowColorTest.java | 16 assertThat(color).isEqualTo(-6250336); 22 assertThat(color).isEqualTo(1688248480); 27 assertThat(Color.parseColor("#ffffffff")).isEqualTo(-1); 28 assertThat(Color.parseColor("#00000000")).isEqualTo(0); 30 assertThat(Color.parseColor("#ffaabbcc")).isEqualTo(-5588020); 35 assertThat(Color.parseColor("blue")).isEqualTo(-16776961); 36 assertThat(Color.parseColor("black")).isEqualTo(-16777216); 37 assertThat(Color.parseColor("green")).isEqualTo(-16711936); 45 assertThat(hsv[0]).isEqualTo(240f); 46 assertThat(hsv[1]).isEqualTo(1.0f) [all...] |
ShadowUriTest.java | 16 assertThat(testUri.getQuery()).isEqualTo("param=value&another_param=another_value"); 17 assertThat(testUri.getPort()).isEqualTo(8080); 18 assertThat(testUri.getAuthority()).isEqualTo("someplace.com:8080"); 19 assertThat(testUri.getHost()).isEqualTo("someplace.com"); 20 assertThat(testUri.getFragment()).isEqualTo("top"); 21 assertThat(testUri.getPath()).isEqualTo("/a/path"); 22 assertThat(testUri.getScheme()).isEqualTo("http"); 27 assertThat(testUri.getQueryParameter("param")).isEqualTo("value");
|
ShadowLocaleDataTest.java | 25 assertThat(localeData.amPm).isEqualTo(new String[]{"AM", "PM"}); 26 assertThat(localeData.eras).isEqualTo(new String[]{"BC", "AD"}); 28 assertThat(localeData.firstDayOfWeek).isEqualTo(1); 29 assertThat(localeData.minimalDaysInFirstWeek).isEqualTo(1); 31 assertThat(localeData.longMonthNames).isEqualTo(new String[]{"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}); 32 assertThat(localeData.shortMonthNames).isEqualTo(new String[]{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}); 34 assertThat(localeData.longStandAloneMonthNames).isEqualTo(localeData.longMonthNames); 35 assertThat(localeData.shortStandAloneMonthNames).isEqualTo(localeData.shortMonthNames); 37 assertThat(localeData.longWeekdayNames).isEqualTo(new String[]{"", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}); 38 assertThat(localeData.shortWeekdayNames).isEqualTo(new String[]{"", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}) [all...] |
ShadowSystemPropertiesTest.java | 16 assertThat(SystemProperties.get("ro.product.device")).isEqualTo("robolectric"); 21 assertThat(SystemProperties.get("foo", "bar")).isEqualTo("bar"); 30 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(16); 36 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(17); 42 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(18); 48 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(19); 54 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(21); 60 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(22); 66 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(23); 72 assertThat(SystemProperties.getInt("ro.build.version.sdk", 0)).isEqualTo(24) [all...] |
ShadowScrollerTest.java | 26 assertThat(scroller.getStartX()).isEqualTo(0); 27 assertThat(scroller.getStartY()).isEqualTo(0); 28 assertThat(scroller.getFinalX()).isEqualTo(12); 29 assertThat(scroller.getFinalY()).isEqualTo(36); 30 assertThat(scroller.getDuration()).isEqualTo(1000); 32 assertThat(scroller.getCurrX()).isEqualTo(0); 33 assertThat(scroller.getCurrY()).isEqualTo(0); 35 assertThat(scroller.timePassed()).isEqualTo(0); 38 assertThat(scroller.getCurrX()).isEqualTo(4); 39 assertThat(scroller.getCurrY()).isEqualTo(12) [all...] |
ShadowCursorWindowTest.java | 18 assertThat(window.getName()).isEqualTo("name"); 31 assertThat(window.getNumRows()).isEqualTo(3); 33 assertThat(window.getInt(0, 0)).isEqualTo(12); 34 assertThat(window.getString(0, 1)).isEqualTo("hello"); 36 assertThat(window.getBlob(0, 3)).isEqualTo(new byte[] {(byte) 0xba, (byte) 0xdc, (byte) 0xaf, (byte) 0xfe}); 38 assertThat(window.getInt(1, 0)).isEqualTo(34); 39 assertThat(window.getString(1, 1)).isEqualTo("baz"); 40 assertThat(window.getFloat(1, 2)).isEqualTo(1.2f); 41 assertThat(window.getBlob(1, 3)).isEqualTo(null); 43 assertThat(window.getBlob(2, 3)).isEqualTo(new byte[]{}) [all...] |
ShadowCameraParametersTest.java | 32 assertThat(pictureSize.width).isEqualTo(800); 33 assertThat(pictureSize.height).isEqualTo(600); 34 assertThat(Shadows.shadowOf(parameters).getPictureHeight()).isEqualTo(600); 35 assertThat(Shadows.shadowOf(parameters).getPictureWidth()).isEqualTo(800); 46 assertThat(fpsRange[1]).isEqualTo(25); 47 assertThat(fpsRange[0]).isEqualTo(15); 54 assertThat(parameters.getPreviewFrameRate()).isEqualTo(15); 63 assertThat(size.width).isEqualTo(320); 64 assertThat(size.height).isEqualTo(240); 65 assertThat(Shadows.shadowOf(parameters).getPreviewWidth()).isEqualTo(320) [all...] |
ShadowMatrixCursorTest.java | 32 assertThat(cursor.getCount()).isEqualTo(2); 36 assertThat(cursor.getString(0)).isEqualTo("foo"); 37 assertThat(cursor.getLong(1)).isEqualTo(10L); 38 assertThat(cursor.getFloat(2)).isEqualTo(0.1f); 42 assertThat(cursor.getString(0)).isEqualTo("baz"); 43 assertThat(cursor.getLong(1)).isEqualTo(20L); 54 assertThat(cursor.getCount()).isEqualTo(2); 58 assertThat(cursor.getString(0)).isEqualTo("foo"); 59 assertThat(cursor.getLong(1)).isEqualTo(10L); 60 assertThat(cursor.getFloat(2)).isEqualTo(0.1f) [all...] |
ShadowPairTest.java | 16 assertThat(pair.first).isEqualTo("a"); 17 assertThat(pair.second).isEqualTo(1); 23 assertThat(p.first).isEqualTo("Foo"); 24 assertThat(p.second).isEqualTo("Bar"); 29 assertThat(Pair.create("1", 2)).isEqualTo(Pair.create("1", 2)); 34 assertThat(Pair.create("1", 2).hashCode()).isEqualTo(Pair.create("1", 2).hashCode());
|
/external/robolectric-shadows/resources/src/test/java/org/robolectric/res/ |
QualifiersTest.java | 15 assertThat(configFrom("values-land-finger")).isEqualTo("land-finger"); 40 assertThat(Qualifiers.addPlatformVersion("", 21)).isEqualTo("v21"); 41 assertThat(Qualifiers.addPlatformVersion("v23", 21)).isEqualTo("v23"); 42 assertThat(Qualifiers.addPlatformVersion("foo-v14", 21)).isEqualTo("foo-v14"); 46 assertThat(Qualifiers.addSmallestScreenWidth("", 320)).isEqualTo("sw320dp"); 47 assertThat(Qualifiers.addSmallestScreenWidth("sw160dp", 320)).isEqualTo("sw160dp"); 48 assertThat(Qualifiers.addSmallestScreenWidth("sw480dp", 320)).isEqualTo("sw480dp"); 49 assertThat(Qualifiers.addSmallestScreenWidth("en-v23", 320)).isEqualTo("en-v23-sw320dp"); // todo: order is wrong here 50 assertThat(Qualifiers.addSmallestScreenWidth("en-sw160dp-v23", 320)).isEqualTo("en-sw160dp-v23"); 51 assertThat(Qualifiers.addSmallestScreenWidth("en-sw480dp-v23", 320)).isEqualTo("en-sw480dp-v23") [all...] |
ResTypeTest.java | 18 assertThat(ResType.inferFromValue("#802C76AD")).isEqualTo(ResType.COLOR); 20 assertThat(ResType.inferFromValue("true")).isEqualTo(ResType.BOOLEAN); 21 assertThat(ResType.inferFromValue("false")).isEqualTo(ResType.BOOLEAN); 23 assertThat(ResType.inferFromValue("10dp")).isEqualTo(ResType.DIMEN); 24 assertThat(ResType.inferFromValue("10sp")).isEqualTo(ResType.DIMEN); 25 assertThat(ResType.inferFromValue("10pt")).isEqualTo(ResType.DIMEN); 26 assertThat(ResType.inferFromValue("10px")).isEqualTo(ResType.DIMEN); 27 assertThat(ResType.inferFromValue("10in")).isEqualTo(ResType.DIMEN); 29 assertThat(ResType.inferFromValue("10")).isEqualTo(ResType.INTEGER); 31 assertThat(ResType.inferFromValue("10.9")).isEqualTo(ResType.FRACTION) [all...] |
/external/javapoet/src/test/java/com/squareup/javapoet/ |
NameAllocatorTest.java | 26 assertThat(nameAllocator.newName("foo", 1)).isEqualTo("foo"); 27 assertThat(nameAllocator.newName("bar", 2)).isEqualTo("bar"); 28 assertThat(nameAllocator.get(1)).isEqualTo("foo"); 29 assertThat(nameAllocator.get(2)).isEqualTo("bar"); 34 assertThat(nameAllocator.newName("foo")).isEqualTo("foo"); 35 assertThat(nameAllocator.newName("foo")).isEqualTo("foo_"); 36 assertThat(nameAllocator.newName("foo")).isEqualTo("foo__"); 41 assertThat(nameAllocator.newName("foo", 1)).isEqualTo("foo"); 42 assertThat(nameAllocator.newName("foo", 2)).isEqualTo("foo_"); 43 assertThat(nameAllocator.newName("foo", 3)).isEqualTo("foo__") [all...] |
/external/turbine/javatests/com/google/turbine/diag/ |
LineMapTest.java | 33 assertThat(map.lineNumber(0)).isEqualTo(1); 34 assertThat(map.lineNumber(input.indexOf("world") - 1)).isEqualTo(1); 35 assertThat(map.lineNumber(input.indexOf("world"))).isEqualTo(2); 36 assertThat(map.lineNumber(input.length() - 1)).isEqualTo(2); 38 assertThat(map.column(0)).isEqualTo(0); 39 assertThat(map.column(input.indexOf("world"))).isEqualTo(0); 40 assertThat(map.column(input.indexOf("world") + 1)).isEqualTo(1); 48 assertThat(map.lineNumber(0)).isEqualTo(1); 49 assertThat(map.lineNumber(1)).isEqualTo(1); 50 assertThat(map.lineNumber(2)).isEqualTo(2) [all...] |
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/ast/expr/ |
LiteralStringValueExprTest.java | 35 assertThat(new CharLiteralExpr('\t').getValue()).isEqualTo("\\t"); 36 assertThat(new CharLiteralExpr('\b').getValue()).isEqualTo("\\b"); 37 assertThat(new CharLiteralExpr('\f').getValue()).isEqualTo("\\f"); 38 assertThat(new CharLiteralExpr('\r').getValue()).isEqualTo("\\r"); 39 assertThat(new CharLiteralExpr('\n').getValue()).isEqualTo("\\n"); 40 assertThat(new CharLiteralExpr('\\').getValue()).isEqualTo("\\\\"); 41 assertThat(new CharLiteralExpr('\"').getValue()).isEqualTo("\\\""); 43 assertThat(new IntegerLiteralExpr("0B0").asInt()).isEqualTo(0); 44 assertThat(new IntegerLiteralExpr("0b0").asInt()).isEqualTo(0); 45 assertThat(new IntegerLiteralExpr("0X0").asInt()).isEqualTo(0) [all...] |
/external/opencensus-java/api/src/test/java/io/opencensus/common/ |
TimestampTest.java | 34 assertThat(Timestamp.create(24, 42).getSeconds()).isEqualTo(24); 35 assertThat(Timestamp.create(24, 42).getNanos()).isEqualTo(42); 36 assertThat(Timestamp.create(-24, 42).getSeconds()).isEqualTo(-24); 37 assertThat(Timestamp.create(-24, 42).getNanos()).isEqualTo(42); 38 assertThat(Timestamp.create(315576000000L, 999999999).getSeconds()).isEqualTo(315576000000L); 39 assertThat(Timestamp.create(315576000000L, 999999999).getNanos()).isEqualTo(999999999); 40 assertThat(Timestamp.create(-315576000000L, 999999999).getSeconds()).isEqualTo(-315576000000L); 41 assertThat(Timestamp.create(-315576000000L, 999999999).getNanos()).isEqualTo(999999999); 88 assertThat(Timestamp.fromMillis(0)).isEqualTo(Timestamp.create(0, 0)); 89 assertThat(Timestamp.fromMillis(987)).isEqualTo(Timestamp.create(0, 987000000)) [all...] |
/external/opencensus-java/contrib/http_util/src/test/java/io/opencensus/contrib/http/util/ |
HttpMeasureConstantsTest.java | 34 .isEqualTo(TagKey.create("http_client_status")); 36 .isEqualTo(TagKey.create("http_client_method")); 37 assertThat(HttpMeasureConstants.HTTP_CLIENT_PATH).isEqualTo(TagKey.create("http_client_path")); 38 assertThat(HttpMeasureConstants.HTTP_CLIENT_HOST).isEqualTo(TagKey.create("http_client_host")); 40 .isEqualTo(TagKey.create("http_server_status")); 42 .isEqualTo(TagKey.create("http_server_method")); 43 assertThat(HttpMeasureConstants.HTTP_SERVER_PATH).isEqualTo(TagKey.create("http_server_path")); 44 assertThat(HttpMeasureConstants.HTTP_SERVER_HOST).isEqualTo(TagKey.create("http_server_host")); 47 assertThat(HttpMeasureConstants.HTTP_CLIENT_SENT_BYTES.getUnit()).isEqualTo("By"); 48 assertThat(HttpMeasureConstants.HTTP_CLIENT_RECEIVED_BYTES.getUnit()).isEqualTo("By") [all...] |
/external/desugar/test/java/com/google/devtools/build/android/desugar/ |
DesugarLongCompareTest.java | 62 assertThat(counter.get()).isEqualTo(0); 70 assertThat(ClassCallingLongCompare.compareLongWithLambda(1, 0)).isEqualTo(1); 71 assertThat(ClassCallingLongCompare.compareLongWithLambda(1, 1)).isEqualTo(0); 72 assertThat(ClassCallingLongCompare.compareLongWithLambda(1, 2)).isEqualTo(-1); 74 .isEqualTo(1); 76 .isEqualTo(0); 78 .isEqualTo(-1); 83 assertThat(ClassCallingLongCompare.compareLongWithMethodReference(1, 0)).isEqualTo(1); 84 assertThat(ClassCallingLongCompare.compareLongWithMethodReference(1, 1)).isEqualTo(0); 85 assertThat(ClassCallingLongCompare.compareLongWithMethodReference(1, 2)).isEqualTo(-1) [all...] |
/external/dagger2/compiler/src/it/functional-tests/src/test/java/test/builder/ |
BuilderTest.java | 45 assertThat(component.s()).isEqualTo("sam"); 46 assertThat(component.i()).isEqualTo(1); 48 assertThat(component.f()).isEqualTo(5.5f); 49 assertThat(component.l()).isEqualTo(6L); 69 assertThat(component.s()).isEqualTo("sam"); 70 assertThat(component.i()).isEqualTo(1); 72 assertThat(component.f()).isEqualTo(5.5f); 73 assertThat(component.l()).isEqualTo(6L); 93 assertThat(component.s()).isEqualTo("sam"); 94 assertThat(component.i()).isEqualTo(1) [all...] |
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/fakes/ |
RoboCursorTest.java | 52 assertThat(cursor.uri).isEqualTo(uri); 53 assertThat(cursor.projection[0]).isEqualTo("projection"); 54 assertThat(cursor.selection).isEqualTo("selection"); 55 assertThat(cursor.selectionArgs[0]).isEqualTo("selection"); 56 assertThat(cursor.sortOrder).isEqualTo("sortOrder"); 66 assertThat(cursor.getColumnCount()).isEqualTo(3); 69 assertThat(cursor.getColumnCount()).isEqualTo(4); 74 assertThat(cursor.getColumnCount()).isEqualTo(8); 75 assertThat(cursor.getColumnName(0)).isEqualTo(STRING_COLUMN); 76 assertThat(cursor.getColumnName(1)).isEqualTo(LONG_COLUMN) [all...] |
/external/opencensus-java/api/src/test/java/io/opencensus/trace/ |
NetworkEventTest.java | 37 assertThat(networkEvent.getType()).isEqualTo(NetworkEvent.Type.SENT); 38 assertThat(networkEvent.getMessageId()).isEqualTo(1L); 40 assertThat(networkEvent.getUncompressedMessageSize()).isEqualTo(0L); 49 assertThat(networkEvent.getKernelTimestamp()).isEqualTo(Timestamp.fromMillis(123456L)); 50 assertThat(networkEvent.getType()).isEqualTo(NetworkEvent.Type.SENT); 51 assertThat(networkEvent.getMessageId()).isEqualTo(1L); 52 assertThat(networkEvent.getUncompressedMessageSize()).isEqualTo(0L); 60 assertThat(networkEvent.getType()).isEqualTo(NetworkEvent.Type.SENT); 61 assertThat(networkEvent.getMessageId()).isEqualTo(1L); 62 assertThat(networkEvent.getUncompressedMessageSize()).isEqualTo(123L) [all...] |
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/internal/bytecode/ |
InvocationProfileTest.java | 15 assertThat(profile.clazz).isEqualTo(View.class); 16 assertThat(profile.methodName).isEqualTo("invalidate"); 17 assertThat(profile.isStatic).isEqualTo(false); 24 assertThat(profile.clazz).isEqualTo(View.class); 25 assertThat(profile.methodName).isEqualTo("invalidate"); 26 assertThat(profile.isStatic).isEqualTo(false);
|
MethodSignatureTest.java | 15 assertThat(signature.className).isEqualTo("java.lang.Long"); 16 assertThat(signature.methodName).isEqualTo("foo"); 18 assertThat(signature.returnType).isEqualTo("boolean"); 24 assertThat(signature.className).isEqualTo("java.lang.Long"); 25 assertThat(signature.methodName).isEqualTo("foo"); 27 assertThat(signature.returnType).isEqualTo("java.lang.Long");
|