1 /******************************************************************************
2 * Copyright (c) 2002 - 2007 IBM Corporation.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * IBM Corporation - initial API and implementation
10 *****************************************************************************/
11 package com
.ibm
.wala
.domAnalysis
.js
.translator
.test
;
17 import com
.ibm
.wala
.util
.debug
.Assertions
;
18 import com
.ibm
.wala
.cast
.js
.test
.*;
19 import com
.ibm
.wala
.classLoader
.*;
20 import com
.ibm
.wala
.domAnalysis
.translator
.test
.TestTreeTranslatorBase
;
21 import com
.ibm
.wala
.eclipse
.util
.CancelException
;
22 import com
.ibm
.wala
.ipa
.callgraph
.propagation
.*;
24 abstract public class TestJSTreeTranslatorBase
extends TestTreeTranslatorBase
{
25 static private ClassLoader loader
=
26 TestJSTreeTranslatorBase
.class.getClassLoader();
28 protected PropagationCallGraphBuilder
makeCallGraphBuilder()
29 throws CancelException
31 return makeCallGraphBuilder("test.js");
34 protected PropagationCallGraphBuilder
makeCallGraphBuilder(String testFile
)
35 throws CancelException
38 URL url
= loader
.getResource("com/ibm/wala/domAnalysis/js/test/example/" + testFile
);
39 PropagationCallGraphBuilder builder
=
41 new SourceFileModule
[]{
42 Util
.makeSourceModule(url
, testFile
) },
44 builder
.makeCallGraph( builder
.getOptions() );
46 } catch (IOException e
) {
47 Assertions
.UNREACHABLE();