Java Assert assertion(String operator, String expr)

Here you can find the source of assertion(String operator, String expr)

Description

assertion

License

Open Source License

Declaration

public static String assertion(String operator, String expr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String assertion(String operator, String expr) {
        return "(assert (" + operator + " " + toBool(expr) + "))\n";
    }//from  w  w  w .ja v a  2s  . com

    public static String assertion(String operator, String lhs, String rhs) {
        return "(assert (" + operator + " " + lhs + " " + rhs + "))\n";
    }

    public static String toBool(String bv) {
        return "(tobool " + bv + ")";
    }
}

Related

  1. assertInstanceOf(Object object, Class expectClass)
  2. assertIntegerGreaterThanZero(long number, String name)
  3. assertIntegerNotNegative(String message, int num)
  4. assertion(boolean isTrue, String reason)
  5. assertion(boolean value)
  6. assertionError(String message, Object... args)
  7. assertionError(String message, Throwable cause)
  8. assertIOThread(Thread t, boolean flag)
  9. assertIsClass(Class klazz)