|
Lines 1983-1987
Link Here
|
| 1983 |
}); |
1983 |
}); |
| 1984 |
}); |
1984 |
}); |
| 1985 |
|
1985 |
|
|
|
1986 |
/** |
| 1987 |
* Tests throw statements |
| 1988 |
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438402 |
| 1989 |
*/ |
| 1990 |
it('test_throwStatement1', function() { |
| 1991 |
editorContext.text = "var a; throw a;"; |
| 1992 |
return occurrences.computeOccurrences(editorContext, setContext(4, 4)).then(function(results) { |
| 1993 |
try { |
| 1994 |
assertOccurrences(results, [{start:4, end:5}, {start:13, end:14}]); |
| 1995 |
} |
| 1996 |
finally { |
| 1997 |
tearDown(); |
| 1998 |
} |
| 1999 |
}); |
| 2000 |
}); |
| 2001 |
|
| 2002 |
/** |
| 2003 |
* Tests throw statements |
| 2004 |
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438402 |
| 2005 |
*/ |
| 2006 |
it('test_throwStatement2', function() { |
| 2007 |
editorContext.text = "var a; function f() { if(a) { throw a; }}"; |
| 2008 |
return occurrences.computeOccurrences(editorContext, setContext(25, 25)).then(function(results) { |
| 2009 |
try { |
| 2010 |
assertOccurrences(results, [{start:4, end:5}, {start:25, end:26}, {start:36, end:37}]); |
| 2011 |
} |
| 2012 |
finally { |
| 2013 |
tearDown(); |
| 2014 |
} |
| 2015 |
}); |
| 2016 |
}); |
| 2017 |
|
| 2018 |
/** |
| 2019 |
* Tests throw statements |
| 2020 |
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438402 |
| 2021 |
*/ |
| 2022 |
it('test_throwStatement3', function() { |
| 2023 |
editorContext.text = "var a; function f() { if(a) { throw a; }}"; |
| 2024 |
return occurrences.computeOccurrences(editorContext, setContext(36, 36)).then(function(results) { |
| 2025 |
try { |
| 2026 |
assertOccurrences(results, [{start:4, end:5}, {start:25, end:26}, {start:36, end:37}]); |
| 2027 |
} |
| 2028 |
finally { |
| 2029 |
tearDown(); |
| 2030 |
} |
| 2031 |
}); |
| 2032 |
}); |
| 1986 |
}); |
2033 |
}); |
| 1987 |
}); |
2034 |
}); |