dump.html revision 9a76bc095233b0cb0be3a913f5913bfc72c38b6c
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YUI dump Tests</title>
</head>
<body class="yui3-skin-sam">
<h1>dump Tests</h1>
<p><input type="button" value="Run Tests" id="btnRun" disabled="true" /></p>
<script type="text/javascript" src="/build/yui/yui.js"></script>
<script type="text/javascript">
(function() {
YUI({
filter: "debug",
logExclude: {Dom:true, Selector:true, Node:true, attribute:true, event:true, base:true}
}).use("dump", "test", "console", "event-custom", function(Y) {
var button = Y.one('#btnRun'),
Assert = Y.Assert,
ObjectAssert = Y.ObjectAssert;
// Set up the page
button.set("disabled", false);
Y.on("click", function() {
Y.Test.Runner.run();
}, button);
var myConsole = new Y.Console().render();
var testdump= new Y.Test.Case({
name: "dump tests",
test_dump: function() {
Assert.areEqual("0", Y.Lang.dump(0));
Assert.areEqual("null", Y.Lang.dump(null));
Assert.areEqual("false", Y.Lang.dump(false));
// Other types tested in substitute
}
});
Y.Test.Runner.setName("Dump");
Y.Test.Runner.add(testdump);
Y.Test.Runner.run();
});
})();
</script>
</body>
</html>