2007-02-02 17:28:04 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* Copyright (c) 2002 - 2006 IBM Corporation.
|
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
|
|
* which accompanies this distribution, and is available at
|
|
|
|
* http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
*
|
|
|
|
* Contributors:
|
|
|
|
* IBM Corporation - initial API and implementation
|
|
|
|
*****************************************************************************/
|
|
|
|
package com.ibm.wala.cast.js.test;
|
|
|
|
|
2007-07-11 21:08:26 +00:00
|
|
|
import java.io.IOException;
|
|
|
|
import java.net.URL;
|
2007-02-02 17:28:04 +00:00
|
|
|
|
2009-07-27 23:21:22 +00:00
|
|
|
import org.junit.Test;
|
|
|
|
|
2012-02-17 20:22:14 +00:00
|
|
|
import com.ibm.wala.cast.js.test.JSCallGraphBuilderUtil.CGBuilderType;
|
2007-07-11 21:08:26 +00:00
|
|
|
import com.ibm.wala.ipa.callgraph.CallGraph;
|
2009-06-22 15:06:12 +00:00
|
|
|
import com.ibm.wala.util.CancelException;
|
2007-02-02 17:28:04 +00:00
|
|
|
|
2009-07-27 23:21:22 +00:00
|
|
|
public abstract class TestAjaxsltCallGraphShape extends TestJSCallGraphShape {
|
2007-02-02 17:28:04 +00:00
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
justThisTest(TestAjaxsltCallGraphShape.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
private static final Object[][] assertionsForAjaxslt = new Object[][] {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2009-07-27 23:21:22 +00:00
|
|
|
@Test public void testAjaxslt() throws IOException, IllegalArgumentException, CancelException {
|
2007-02-09 10:06:43 +00:00
|
|
|
URL url = getClass().getClassLoader().getResource("ajaxslt/test/xslt.html");
|
2012-01-06 21:48:53 +00:00
|
|
|
// don't handle call / apply; it makes things blow up
|
2012-02-17 20:22:14 +00:00
|
|
|
CallGraph CG = JSCallGraphBuilderUtil.makeHTMLCG(url, CGBuilderType.ZERO_ONE_CFA_NO_CALL_APPLY);
|
2012-01-06 21:48:53 +00:00
|
|
|
|
2007-02-02 17:28:04 +00:00
|
|
|
verifyGraphAssertions(CG, assertionsForAjaxslt);
|
|
|
|
}
|
|
|
|
|
|
|
|
private static final Object[][] assertionsForAjaxpath = new Object[][] {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2009-07-27 23:21:22 +00:00
|
|
|
@Test public void testAjaxpath() throws IOException, IllegalArgumentException, CancelException {
|
2007-02-09 10:06:43 +00:00
|
|
|
URL url = getClass().getClassLoader().getResource("ajaxslt/test/xpath.html");
|
2012-02-17 20:21:59 +00:00
|
|
|
CallGraph CG = JSCallGraphBuilderUtil.makeHTMLCG(url);
|
2007-02-02 17:28:04 +00:00
|
|
|
verifyGraphAssertions(CG, assertionsForAjaxpath);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|