google$truth
@Test public void testDeclaresField_public() {
  @Test public void testDeclaresField_nullSubject() {
  @Test public void testDeclaresField_private() {
  @Test public void testIsAssignableFrom_same() {
void
void testDeclaresField_noSuchField()
@Test public void testDeclaresField_Public() {
  @Test public void testDeclaresField_NullSubject() {
  @Test public void testDeclaresField_Private() {
  @Test public void testIsAssignableFromSame() {
void
void testDeclaresField_NoSuchField()
google$truth
void
void testDeclaresField_nullSubject()
void
void testDeclaresField_NullSubject()
google$truth
void
void testDeclaresField_private()
void
void testDeclaresField_Private()
google$truth
void
void testDeclaresField_public()
void
void testDeclaresField_Public()
google$truth
void
void testIsAssignableFrom_parent()
void
void testIsAssignableFromParent()
https://github.com/google/truth/blob/19324b3ed89081bfa2cea984a4708aa3b8c658a8/core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fcommon%2Ftruth%2FClassSubject.java
https://api.github.com/repos/google/truth/contents/core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fcommon%2Ftruth%2FClassSubject.java?ref=19324b3ed89081bfa2cea984a4708aa3b8c658a8
core/src/main/java/com/google/common/truth/ClassSubject.java
   * Asserts that this class or interface is either the same as, or is a superclass or
  /**
   * Asserts that this class or interface is either the same as, or is a subclass or subinterface
   * of, the given class or interface.
   */
  @GwtIncompatible("isAssignableFrom")
  public void isAssignableTo(Class<?> clazz) {
    if (!clazz.isAssignableFrom(getSubject())) {
      fail("is assignable to", clazz);
    }
  }

Class<?> clazz
core/src/main/java/com/google/common/truth/ClassSubject.java
if (!clazz.isAssignableFrom(getSubject())) {
      fail("is assignable to", clazz);
void isAssignableTo(Class<?> clazz)
   * Attests that this class or interface is either the same as, or is a superclass or
@@ -23,7 +23,7 @@ public ClassSubject(FailureStrategy failureStrategy, Class<?> o) {
   }
 
   /**
-   * Attests that this class or interface is either the same as, or is a superclass or
+   * Asserts that this class or interface is either the same as, or is a superclass or
    * superinterface of, the given class or interface.
    */
   @GwtIncompatible("isAssignableFrom")
@@ -33,6 +33,17 @@ public void isAssignableFrom(Class<?> clazz) {
     }
   }
 
+  /**
+   * Asserts that this class or interface is either the same as, or is a subclass or subinterface
+   * of, the given class or interface.
+   */
+  @GwtIncompatible("isAssignableFrom")
+  public void isAssignableTo(Class<?> clazz) {
+    if (!clazz.isAssignableFrom(getSubject())) {
+      fail("is assignable to", clazz);
+    }
+  }
+
   // TODO(user): Create an alternative implementation using JSNI.
   @GwtIncompatible("Reflection")
   public void declaresField(String fieldName) {
https://github.com/google/truth/raw/19324b3ed89081bfa2cea984a4708aa3b8c658a8/core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fcommon%2Ftruth%2FClassSubject.java
573a769e4b37fc4a78d578810436c4816482e67b
modified
https://github.com/google/truth/blob/19324b3ed89081bfa2cea984a4708aa3b8c658a8/core%2Fsrc%2Ftest%2Fjava%2Fcom%2Fgoogle%2Fcommon%2Ftruth%2FClassTest.java
https://api.github.com/repos/google/truth/contents/core%2Fsrc%2Ftest%2Fjava%2Fcom%2Fgoogle%2Fcommon%2Ftruth%2FClassTest.java?ref=19324b3ed89081bfa2cea984a4708aa3b8c658a8
core/src/test/java/com/google/common/truth/ClassTest.java
  @Test public void testDeclaresField_noSuchField() {
  @Test public void testDeclaresField_public() {
  @Test public void testDeclaresField_nullSubject() {
  @Test public void testDeclaresField_private() {
  @Test public void testIsAssignableFrom_same() {
  }
  @Test public void testIsAssignableFrom_parent() {
  @Test public void testIsAssignableTo_same() {
    assertThat(String.class).isAssignableTo(String.class);
  }

  @Test public void testIsAssignableTo_parent() {
    assertThat(String.class).isAssignableTo(Object.class);
    assertThat(NullPointerException.class).isAssignableTo(Exception.class);
  }

  @Test public void testIsAssignableTo_reversed() {
    try {
      assertThat(Object.class).isAssignableTo(String.class);
      assert_().fail("Should have thrown an assertion error.");
    } catch (AssertionError expected) {
      assertThat(expected.getMessage())
          .isEqualTo("Not true that <class java.lang.Object> "
              + "is assignable to <class java.lang.String>");
    }
  }

  @Test public void testIsAssignableTo_reversedDifferentTypes() {
    try {
      assertThat(String.class).isAssignableTo(Exception.class);
      assert_().fail("Should have thrown an assertion error.");
    } catch (AssertionError expected) {
      assertThat(expected.getMessage())
          .isEqualTo("Not true that <class java.lang.String> "
              + "is assignable to <class java.lang.Exception>");
    }
  }

core/src/test/java/com/google/common/truth/ClassTest.java
@Test public void testDeclaresField_public() {
  @Test public void testDeclaresField_nullSubject() {
  @Test public void testDeclaresField_private() {
  @Test public void testIsAssignableFrom_same() {
void testDeclaresField_noSuchField()
core/src/test/java/com/google/common/truth/ClassTest.java
@Test public void testIsAssignableTo_same() {
    assertThat(String.class).isAssignableTo(String.class);
void testIsAssignableFrom_parent()
core/src/test/java/com/google/common/truth/ClassTest.java
assertThat(String.class).isAssignableTo(Object.class);
    assertThat(NullPointerException.class).isAssignableTo(Exception.class);
void testIsAssignableTo_parent()
core/src/test/java/com/google/common/truth/ClassTest.java
try {
      assertThat(Object.class).isAssignableTo(String.class);
      assert_().fail("Should have thrown an assertion error.");
void testIsAssignableTo_reversed()
core/src/test/java/com/google/common/truth/ClassTest.java
try {
      assertThat(String.class).isAssignableTo(Exception.class);
      assert_().fail("Should have thrown an assertion error.");
void testIsAssignableTo_reversedDifferentTypes()
  @Test public void testDeclaresField_NoSuchField() {
  @Test public void testDeclaresField_Public() {
  @Test public void testDeclaresField_NullSubject() {
  @Test public void testDeclaresField_Private() {
  @Test public void testIsAssignableFromSame() {
  }

  @Test public void testIsAssignableFromParent() {
core/src/test/java/com/google/common/truth/ClassTest.java
@Test public void testDeclaresField_Public() {
  @Test public void testDeclaresField_NullSubject() {
  @Test public void testDeclaresField_Private() {
  @Test public void testIsAssignableFromSame() {
void testDeclaresField_NoSuchField()
@@ -30,7 +30,7 @@
 @RunWith(JUnit4.class)
 public class ClassTest {
 
-  @Test public void testDeclaresField_NoSuchField() {
+  @Test public void testDeclaresField_noSuchField() {
     try {
       assertThat(A.class).declaresField("noField");
       assert_().fail("Should have thrown an assertion error.");
@@ -40,11 +40,11 @@ public class ClassTest {
     }
   }
 
-  @Test public void testDeclaresField_Public() {
+  @Test public void testDeclaresField_public() {
     assertThat(A.class).declaresField("publicField");
   }
 
-  @Test public void testDeclaresField_NullSubject() {
+  @Test public void testDeclaresField_nullSubject() {
     Class<?> nullClass = null;
     try {
       assertThat(nullClass).declaresField("publicField");
@@ -55,19 +55,18 @@ public class ClassTest {
     }
   }
 
-  @Test public void testDeclaresField_Private() {
+  @Test public void testDeclaresField_private() {
     assertThat(A.class).declaresField("privateField");
   }
 
-  @Test public void testIsAssignableFromSame() {
+  @Test public void testIsAssignableFrom_same() {
     assertThat(String.class.isAssignableFrom(String.class)).isTrue();
     assertThat(String.class).isAssignableFrom(String.class);
+  }
 
+  @Test public void testIsAssignableFrom_parent() {
     assertThat(Object.class.isAssignableFrom(String.class)).isTrue();
     assertThat(Object.class).isAssignableFrom(String.class);
-  }
-
-  @Test public void testIsAssignableFromParent() {
     assertThat(Exception.class.isAssignableFrom(NullPointerException.class)).isTrue();
     assertThat(Exception.class).isAssignableFrom(NullPointerException.class);
   }
@@ -96,6 +95,37 @@ public class ClassTest {
     }
   }
 
+  @Test public void testIsAssignableTo_same() {
+    assertThat(String.class).isAssignableTo(String.class);
+  }
+
+  @Test public void testIsAssignableTo_parent() {
+    assertThat(String.class).isAssignableTo(Object.class);
+    assertThat(NullPointerException.class).isAssignableTo(Exception.class);
+  }
+
+  @Test public void testIsAssignableTo_reversed() {
+    try {
+      assertThat(Object.class).isAssignableTo(String.class);
+      assert_().fail("Should have thrown an assertion error.");
+    } catch (AssertionError expected) {
+      assertThat(expected.getMessage())
+          .isEqualTo("Not true that <class java.lang.Object> "
+              + "is assignable to <class java.lang.String>");
+    }
+  }
+
+  @Test public void testIsAssignableTo_reversedDifferentTypes() {
+    try {
+      assertThat(String.class).isAssignableTo(Exception.class);
+      assert_().fail("Should have thrown an assertion error.");
+    } catch (AssertionError expected) {
+      assertThat(expected.getMessage())
+          .isEqualTo("Not true that <class java.lang.String> "
+              + "is assignable to <class java.lang.Exception>");
+    }
+  }
+
   public static class A {
     public String publicField = null;
     @SuppressWarnings("unused")
https://github.com/google/truth/raw/19324b3ed89081bfa2cea984a4708aa3b8c658a8/core%2Fsrc%2Ftest%2Fjava%2Fcom%2Fgoogle%2Fcommon%2Ftruth%2FClassTest.java
227ace6ab6679f106b6c52656242bfb1615d2ac7
modified
google$truth
@Test public void testDeclaresField_public() {
  @Test public void testDeclaresField_nullSubject() {
  @Test public void testDeclaresField_private() {
  @Test public void testIsAssignableFrom_same() {
void
void testDeclaresField_noSuchField()
@Test public void testDeclaresField_Public() {
  @Test public void testDeclaresField_NullSubject() {
  @Test public void testDeclaresField_Private() {
  @Test public void testIsAssignableFromSame() {
void
void testDeclaresField_NoSuchField()