use of com.google.javascript.jscomp.type.FlowScope in project closure-compiler by google.
the class SemanticReverseAbstractInterpreterTest method testSheqCondition5.
@SuppressWarnings("unchecked")
public void testSheqCondition5() throws Exception {
FlowScope blind = newScope();
testBinop(blind, Token.SHEQ, createVar(blind, "a", createUnionType(NULL_TYPE, VOID_TYPE)), createVar(blind, "b", createUnionType(VOID_TYPE)), ImmutableSet.of(new TypedName("a", VOID_TYPE), new TypedName("b", VOID_TYPE)), ImmutableSet.of(new TypedName("a", NULL_TYPE), new TypedName("b", VOID_TYPE)));
}
use of com.google.javascript.jscomp.type.FlowScope in project closure-compiler by google.
the class SemanticReverseAbstractInterpreterTest method testShneCondition4.
@SuppressWarnings("unchecked")
public void testShneCondition4() throws Exception {
FlowScope blind = newScope();
testBinop(blind, Token.SHNE, createVar(blind, "a", createUnionType(STRING_TYPE, VOID_TYPE)), createVar(blind, "b", createUnionType(VOID_TYPE)), ImmutableSet.of(new TypedName("a", STRING_TYPE), new TypedName("b", VOID_TYPE)), ImmutableSet.of(new TypedName("a", VOID_TYPE), new TypedName("b", VOID_TYPE)));
}
use of com.google.javascript.jscomp.type.FlowScope in project closure-compiler by google.
the class SemanticReverseAbstractInterpreterTest method testEqCondition4.
/**
* Tests reverse interpretation of two undefineds.
*/
@SuppressWarnings("unchecked")
public void testEqCondition4() throws Exception {
FlowScope blind = newScope();
testBinop(blind, Token.EQ, createVar(blind, "a", VOID_TYPE), createVar(blind, "b", VOID_TYPE), ImmutableSet.of(new TypedName("a", VOID_TYPE), new TypedName("b", VOID_TYPE)), ImmutableSet.of(new TypedName("a", NO_TYPE), new TypedName("b", NO_TYPE)));
}
use of com.google.javascript.jscomp.type.FlowScope in project closure-compiler by google.
the class SemanticReverseAbstractInterpreterTest method testSheqCondition3.
/**
* Tests reverse interpretation of a SHEQ(NAME, NAME) expression.
*/
@SuppressWarnings("unchecked")
public void testSheqCondition3() throws Exception {
FlowScope blind = newScope();
testBinop(blind, Token.SHEQ, createVar(blind, "b", createUnionType(STRING_TYPE, BOOLEAN_TYPE)), createVar(blind, "a", createUnionType(STRING_TYPE, NUMBER_TYPE)), ImmutableSet.of(new TypedName("a", STRING_TYPE), new TypedName("b", STRING_TYPE)), ImmutableSet.of(new TypedName("a", createUnionType(STRING_TYPE, NUMBER_TYPE)), new TypedName("b", createUnionType(STRING_TYPE, BOOLEAN_TYPE))));
}
use of com.google.javascript.jscomp.type.FlowScope in project closure-compiler by google.
the class SemanticReverseAbstractInterpreterTest method testSheqCondition4.
@SuppressWarnings("unchecked")
public void testSheqCondition4() throws Exception {
FlowScope blind = newScope();
testBinop(blind, Token.SHEQ, createVar(blind, "a", createUnionType(STRING_TYPE, VOID_TYPE)), createVar(blind, "b", createUnionType(VOID_TYPE)), ImmutableSet.of(new TypedName("a", VOID_TYPE), new TypedName("b", VOID_TYPE)), ImmutableSet.of(new TypedName("a", STRING_TYPE), new TypedName("b", VOID_TYPE)));
}
Aggregations