All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.junit.experimental.theories.PotentialAssignment Maven / Gradle / Ivy

Go to download

A collection of tests that can certify language implementation to be compliant with most recent requirements of the Truffle infrastructure and tooling.

The newest version!
package org.junit.experimental.theories;

public abstract class PotentialAssignment {
    public static class CouldNotGenerateValueException extends Exception {
        private static final long serialVersionUID = 1L;
    }

    public static PotentialAssignment forValue(final String name, final Object value) {
        return new PotentialAssignment() {
            @Override
            public Object getValue() throws CouldNotGenerateValueException {
                return value;
            }

            @Override
            public String toString() {
                return String.format("[%s]", value);
            }

            @Override
            public String getDescription()
                    throws CouldNotGenerateValueException {
                return name;
            }
        };
    }

    public abstract Object getValue() throws CouldNotGenerateValueException;

    public abstract String getDescription() throws CouldNotGenerateValueException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy