Add empty test file and update Makefile

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2437 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2013-02-20 06:42:00 +00:00
parent ba387c22d3
commit bbe79434d6
4 changed files with 42 additions and 5 deletions

View File

@ -18,6 +18,7 @@ JS_FILES=\
sanitize.js \
history.js \
coords.js \
recalculate.js \
select.js \
draw.js \
path.js \

View File

@ -17,6 +17,7 @@
<iframe src='path_test.html' width='100%' height='70' scrolling='no'></iframe>
<iframe src='sanitize_test.html' width='100%' height='70' scrolling='no'></iframe>
<iframe src='coords_test.html' width='100%' height='70' scrolling='no'></iframe>
<iframe src='recalculate_test.html' width='100%' height='70' scrolling='no'></iframe>
</body>
<script>
window.setTimeout(function() {

View File

@ -52,11 +52,6 @@
}
}
// TODO: Since recalculateDimensions() and surrounding code is
// probably the largest, most complicated and strange piece of
// code in SVG-edit, we need to write a whole lot of unit tests
// for it here.
test('Test remapElement(translate) for rect', function() {
expect(4);

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<title>Unit Tests for recalculate.js</title>
<link rel='stylesheet' href='qunit/qunit.css' type='text/css'/>
<script type='text/javascript' src='../editor/svgedit.js'></script>
<script type='text/javascript' src='../editor/browser.js'></script>
<script type='text/javascript' src='../editor/math.js'></script>
<script type='text/javascript' src='../editor/history.js'></script>
<script type='text/javascript' src='../editor/units.js'></script>
<script type='text/javascript' src='../editor/svgtransformlist.js'></script>
<script type='text/javascript' src='../editor/svgutils.js'></script>
<script type='text/javascript' src='../editor/coords.js'></script>
<script type='text/javascript' src='../editor/recalculate.js'></script>
<script type='text/javascript' src='qunit/qunit.js'></script>
<script type='text/javascript'>
$(function() {
// log function
QUnit.log = function(result, message) {
if (window.console && window.console.log) {
window.console.log(result +' :: '+ message);
}
};
// TODO: Since recalculateDimensions() and surrounding code is
// probably the largest, most complicated and strange piece of
// code in SVG-edit, we need to write a whole lot of unit tests
// for it here.
});
</script>
</head>
<body>
<h1 id='qunit-header'>Unit Tests for svgedit.recalculate</h1>
<h2 id='qunit-banner'></h2>
<h2 id='qunit-userAgent'></h2>
<ol id='qunit-tests'></ol>
<div id='root' style='visibility:hidden'></div>
</body>
</html>