<?xml version = "1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<!-- 
	See COPYING for copyright and distribution information.
-->
<html xmlns = "http://www.w3.org/1999/xhtml">

<head>
	<title>NDN Name</title>
	
	<script type="text/javascript" src="../Helper.js"></script>

	<script type="text/javascript">
	
function testName() {
    var result = document.getElementById('result');
    result.innerHTML = "";
    
    var comp1 = new Uint8Array(1); 
    comp1.set(['.'.charCodeAt(0)]);
    
    var ab2 = new ArrayBuffer(4); 
    var comp2 = new Uint8Array(ab2); 
    comp2.set([0x00, 0x01, 0x02, 0x03]);

    // \u00E9 is e with accent.
    var entree = "entr\u00E9e";

    // When Name constructor is passed an array, each item is a name component represented with ArrayBuffer, 
    //   typed array, or string (parsed as UTF-8)
    var name1 = new Name([entree, comp1, ab2]);
    var name1Uri = name1.to_uri();
    var name1UriExpected = "/entr%C3%A9e/..../%00%01%02%03";
    result.innerHTML += "Name from '" + entree + "', Uint8Array of '.' and ArrayBuffer of 0,1,2,3:<br>";
    if (name1Uri == name1UriExpected)
        result.innerHTML += "SUCCESS: " + name1Uri + ".<br>";
    else
        result.innerHTML += "ERROR: got " + name1Uri + ", expected " + name1UriExpected + " .<br>";

    result.innerHTML += "Compare with same Name from '" + entree + "', '.' and ArrayBuffer:<br>";
    // Equivalent with name1
    var name2 = new Name([entree, ".", comp2]);
    if (name2.components.length != name1.components.length)
        result.innerHTML += "ERROR: Got name with " + name2.components.length + 
            " components, expected " + name1.components.length + ".<br>";
    else {
        var allEqual = true;
        for (var i = 0; i < name1.components.length; ++i) {
            if (!DataUtils.arraysEqual(name1.components[i], name2.components[i])) {
                allEqual = false;
                result.innerHTML += "ERROR: Names differ at component at index " + i + ".<br>";
            }
        }
        if (allEqual)
            result.innerHTML += "SUCCESS: Names are equal.<br>";
    }
    
    result.innerHTML += "Compare with same Name from URI:<br>";
    // Equivalent with name1; when Name constructor is passed a string, it is treated as a URI
    var name3 = new Name("/entr%C3%A9e/..../%00%01%02%03");
    if (name3.components.length != name1.components.length)
        result.innerHTML += "ERROR: Got name with " + name3.components.length + 
            " components, expected " + name1.components.length + ".<br>";
    else {
        var allEqual = true;
        for (var i = 0; i < name1.components.length; ++i) {
            if (!DataUtils.arraysEqual(name1.components[i], name3.components[i])) {
                allEqual = false;
                result.innerHTML += "ERROR: Names differ at component at index " + i + ".<br>";
            }
        }
        if (allEqual)
            result.innerHTML += "SUCCESS: Names are equal.<br>";
    }    
    
    result.innerHTML += "Compare with Name prefix of first 2 components:<br>";
    // Returns new Name([entree, "."])
    var name4 = name2.getPrefix(2);
    if (name4.components.length != 2)
        result.innerHTML += "ERROR: Got name with " + name4.components.length + 
            " components, expected 2.<br>";
    else {
        var allEqual = true;
        for (var i = 0; i < name4.components.length; ++i) {
            if (!DataUtils.arraysEqual(name1.components[i], name4.components[i])) {
                allEqual = false;
                result.innerHTML += "ERROR: Names differ at component at index " + i + ".<br>";
            }
        }
        if (allEqual)
            result.innerHTML += "SUCCESS: First 2 components are equal: " + name4.to_uri() + " .<br>";
    }    
    
    result.innerHTML += "Check with Name component at index 2:<br>";
    // Returns ArrayBuffer of "%00%01%02%03"
    var component2Out = new Uint8Array(name1.getComponent(2));
    if (DataUtils.arraysEqual(component2Out, comp2))
        result.innerHTML += "SUCCESS: Components at index 2 are equal.<br>";
    else
        result.innerHTML += "ERROR: Components at index 2 are different.<br>";
}

	</script>

</head>
<body >
	<button onclick="testName()">Test</button>
	
	<p id="result"></p>

</body>
</html>
