Java Assert Equal assertEquals(int i1, int i2)

Here you can find the source of assertEquals(int i1, int i2)

Description

Throws a runtime exception if i1 != i2.

License

Apache License

Declaration

public static void assertEquals(int i1, int i2) 

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

public class Main {
    /**//from   w w  w .j av  a  2 s .  c  om
     * Throws a runtime exception if i1 != i2.
     */
    public static void assertEquals(int i1, int i2) {
        if (i1 != i2) {
            throw new RuntimeException("assert " + i1 + " == " + i2);
        }
    }
}

Related

  1. assertEquals(double x, double y)
  2. assertEquals(final int expected, final int actual)
  3. assertEquals(final Object actual, final Object expected, final String name)
  4. assertEquals(float a1, float a2)
  5. assertEquals(int a, int b)
  6. assertEquals(Integer a, Integer b)
  7. assertEquals(Object a, Object b, String msg)
  8. assertEquals(Object exp, Object actual)
  9. assertEquals(Object expected, Object actual)