public class GosuTestUtil extends Object
| Constructor and Description |
|---|
GosuTestUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertCausesPRE(String script,
ResourceKey... keys) |
static void |
assertHasErrors(IGosuClass gsClass,
ResourceKey... expected) |
static void |
assertHasErrors(String strClass,
ResourceKey... expected) |
static void |
assertOneError(IGosuClass gsClass,
ResourceKey errorKey) |
static void |
assertOneError(String strClass,
ResourceKey errorKey) |
static void |
assertOneWarning(IGosuClass gsClass,
ResourceKey warningKey) |
static void |
assertOneWarning(String strClass,
ResourceKey warningKey) |
static IExpression |
compileExpression(String script) |
static IExpression |
compileExpression(String script,
boolean bThrowOnWarning) |
static IExpression |
compileExpression(String script,
ISymbolTable table) |
static IExpression |
compileExpression(String script,
ISymbolTable table,
boolean bThrowOnWarning) |
static IExpression |
compileExpression(String script,
String varName,
IType varType) |
static IExpression |
compileExpression(String script,
String varName,
IType varType,
String varName2,
IType varType2) |
static IProgram |
compileProgram(String script,
ISymbolTable table) |
static Object |
eval(String script) |
static Object |
eval(String script,
String name1,
Object val1) |
static Object |
evalGosu(String script)
Evaluates the given Gosu.
|
static Object |
evalGosu(String script,
ISymbolTable table) |
static Object |
evalGosu(String script,
Object[] args)
Evaluates the given Gosu, with variables of the given names that will be the
dynamic (runtime) type of the values passed in.
|
static Object |
evalGosu(String script,
String name1,
Object val1)
Evaluates the given Gosu, with variables of the given names that will be the
dynamic (runtime) type of the values passed in.
|
static Object |
evalGosu(String script,
String name1,
Object val1,
String name2,
Object val2)
Evaluates the given Gosu, with variables of the given names that will be the
dynamic (runtime) type of the values passed in.
|
static Object |
evalGosu(String script,
String name1,
Object val1,
String name2,
Object val2,
String name3,
Object val3)
Evaluates the given Gosu, with variables of the given names that will be the
dynamic (runtime) type of the values passed in.
|
static Object |
evalGosu(String script,
String name1,
Object val1,
String name2,
Object val2,
String name3,
Object val3,
String name4,
Object val4)
Evaluates the given Gosu, with variables of the given names that will be the
dynamic (runtime) type of the values passed in.
|
static Object |
evalGosu(String script,
String name1,
Object val1,
String name2,
Object val2,
String name3,
Object val3,
String name4,
Object val4,
String name5,
Object val5)
Evaluates the given Gosu, with variables of the given names that will be the
dynamic (runtime) type of the values passed in.
|
static ParseResultsException |
getParseResultsException(String script)
Gets the parse results exception caused by the given program.
|
public static Object evalGosu(String script) throws ParseResultsException
script - - Must be non-nullParseResultsExceptionpublic static Object evalGosu(String script, String name1, Object val1) throws ParseResultsException
val1 - - Must be non-nullParseResultsExceptionpublic static Object evalGosu(String script, String name1, Object val1, String name2, Object val2) throws ParseResultsException
val1 - cannot be null.val2 - cannot be null.ParseResultsExceptionpublic static Object evalGosu(String script, String name1, Object val1, String name2, Object val2, String name3, Object val3) throws ParseResultsException
val1 - cannot be null.val2 - cannot be null.val3 - cannot be null.ParseResultsExceptionpublic static Object evalGosu(String script, String name1, Object val1, String name2, Object val2, String name3, Object val3, String name4, Object val4) throws ParseResultsException
val1 - cannot be null.val2 - cannot be null.val3 - cannot be null.val4 - cannot be null.ParseResultsExceptionpublic static Object evalGosu(String script, String name1, Object val1, String name2, Object val2, String name3, Object val3, String name4, Object val4, String name5, Object val5) throws ParseResultsException
val1 - cannot be null.val2 - cannot be null.val3 - cannot be null.val4 - cannot be null.val5 - cannot be null.ParseResultsExceptionpublic static Object evalGosu(String script, Object[] args) throws ParseResultsException
args - must be an array of alternating non-null name/value pairsParseResultsExceptionpublic static Object evalGosu(String script, ISymbolTable table) throws ParseResultsException
ParseResultsExceptionpublic static IExpression compileExpression(String script) throws ParseResultsException
ParseResultsExceptionpublic static IExpression compileExpression(String script, String varName, IType varType) throws ParseResultsException
ParseResultsExceptionpublic static IExpression compileExpression(String script, String varName, IType varType, String varName2, IType varType2) throws ParseResultsException
ParseResultsExceptionpublic static IExpression compileExpression(String script, ISymbolTable table) throws ParseResultsException
ParseResultsExceptionpublic static IExpression compileExpression(String script, ISymbolTable table, boolean bThrowOnWarning) throws ParseResultsException
ParseResultsExceptionpublic static IExpression compileExpression(String script, boolean bThrowOnWarning) throws ParseResultsException
ParseResultsExceptionpublic static IProgram compileProgram(String script, ISymbolTable table) throws ParseResultsException
ParseResultsExceptionpublic static void assertHasErrors(String strClass, ResourceKey... expected) throws ClassNotFoundException
ClassNotFoundExceptionpublic static void assertHasErrors(IGosuClass gsClass, ResourceKey... expected) throws ClassNotFoundException
ClassNotFoundExceptionpublic static void assertOneError(String strClass, ResourceKey errorKey) throws ClassNotFoundException
ClassNotFoundExceptionpublic static void assertOneError(IGosuClass gsClass, ResourceKey errorKey)
public static void assertOneWarning(String strClass, ResourceKey warningKey) throws ClassNotFoundException
ClassNotFoundExceptionpublic static void assertOneWarning(IGosuClass gsClass, ResourceKey warningKey)
public static ParseResultsException getParseResultsException(String script)
public static void assertCausesPRE(String script, ResourceKey... keys)
Copyright © 2017. All rights reserved.