com.google.caja.parser.js.scope
Class ScopeAnalyzerTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.google.caja.util.CajaTestCase
com.google.caja.parser.js.scope.ScopeAnalyzerTest
- All Implemented Interfaces:
- junit.framework.Test
public class ScopeAnalyzerTest
- extends CajaTestCase
Methods inherited from class com.google.caja.util.CajaTestCase |
assertArrayEquals, assertCloneable, assertDeepEquals, assertMessage, assertMessage, assertMessagesLessSevereThan, assertNoErrors, assertNoMessage, assertNoWarnings, checkHeadless, css, css, cssDecls, cssDecls, dataFromResource, formatShort, fromResource, fromResource, fromString, fromString, fromString, html, htmlFragment, js, js, js, jsExpr, jsExpr, markup, markupFragment, minify, plain, quasi, render, render, renderProgram, runTest, tearDown, xml, xmlFragment |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, setName, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
events
java.util.List<java.lang.String> events
listener
ScopeListener<ScopeAnalyzerTest.TestScope> listener
ScopeAnalyzerTest
public ScopeAnalyzerTest()
testGlobalScope
public final void testGlobalScope()
throws ParseException
- Throws:
ParseException
testFnDecls
public final void testFnDecls()
throws ParseException
- Throws:
ParseException
testFnCtorsInES5
public final void testFnCtorsInES5()
throws ParseException
- Throws:
ParseException
testFnCtorsInJScript
public final void testFnCtorsInJScript()
throws ParseException
- Throws:
ParseException
testFnCtorsInWorstCase
public final void testFnCtorsInWorstCase()
throws ParseException
- Throws:
ParseException
testHoistingOfDecls1
public final void testHoistingOfDecls1()
throws ParseException
- Throws:
ParseException
testHoistingOfDecls2
public final void testHoistingOfDecls2()
throws ParseException
- Throws:
ParseException
testUsageOfThis1
public final void testUsageOfThis1()
throws ParseException
- Throws:
ParseException
testUsageOfThis2
public final void testUsageOfThis2()
throws ParseException
- Throws:
ParseException
testUsageOfArguments
public final void testUsageOfArguments()
throws ParseException
- Throws:
ParseException
testDupesAndMasking
public final void testDupesAndMasking()
throws ParseException
- Throws:
ParseException
testMasking1
public final void testMasking1()
throws ParseException
- Throws:
ParseException
testSplitInitialization
public final void testSplitInitialization()
throws ParseException
- Throws:
ParseException
testMasking2
public final void testMasking2()
throws ParseException
- Throws:
ParseException
testAssignments
public final void testAssignments()
throws ParseException
- Throws:
ParseException
testForEachLoopAssignsPropName1
public final void testForEachLoopAssignsPropName1()
throws ParseException
- Throws:
ParseException
testForEachLoopAssignsPropName2
public final void testForEachLoopAssignsPropName2()
throws ParseException
- Throws:
ParseException
testSameName1
public final void testSameName1()
throws ParseException
- Throws:
ParseException
testFnDeclInCatch
public final void testFnDeclInCatch()
throws ParseException
- Throws:
ParseException
testFnDeclInCatchJS
public final void testFnDeclInCatchJS()
throws ParseException
- Throws:
ParseException
testExceptionReadAndAssign
public final void testExceptionReadAndAssign()
throws ParseException
- Throws:
ParseException
testSameName2
public final void testSameName2()
throws ParseException
- Throws:
ParseException
testSameName3
public final void testSameName3()
throws ParseException
- Throws:
ParseException
testSameName4
public final void testSameName4()
throws ParseException
- Throws:
ParseException
testWithBlock
public final void testWithBlock()
throws ParseException
- Throws:
ParseException
testImmediatelyCalledFns1
public final void testImmediatelyCalledFns1()
throws ParseException
- Throws:
ParseException
testImmediatelyCalledFns2
public final void testImmediatelyCalledFns2()
throws ParseException
- Throws:
ParseException
testImmediatelyCalledFns3
public final void testImmediatelyCalledFns3()
throws ParseException
- Throws:
ParseException
setUp
public void setUp()
throws java.lang.Exception
- Overrides:
setUp
in class CajaTestCase
- Throws:
java.lang.Exception
program
private AncestorChain<Block> program(java.lang.String... lines)
throws ParseException
- Throws:
ParseException
assertEvents
private void assertEvents(java.lang.String... expected)
assertScoping
private void assertScoping(AncestorChain<Block> program,
java.util.List<ScopeAnalyzer<ScopeAnalyzerTest.TestScope>> impls,
java.lang.String... goldenEvents)
allImplementations
private static <S extends AbstractScope> java.util.List<ScopeAnalyzer<S>> allImplementations(ScopeListener<S> listener)
notJScript
private static <S extends AbstractScope> java.util.List<ScopeAnalyzer<S>> notJScript(ScopeListener<S> listener)
Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0