{"action":"created","issue":{"url":"https://api.github.com/repos/infusion/BitSet.js/issues/13","repository_url":"https://api.github.com/repos/infusion/BitSet.js","labels_url":"https://api.github.com/repos/infusion/BitSet.js/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/infusion/BitSet.js/issues/13/comments","events_url":"https://api.github.com/repos/infusion/BitSet.js/issues/13/events","html_url":"https://github.com/infusion/BitSet.js/issues/13","id":144293687,"number":13,"title":"It Appears that a Simple Test is Failing...","user":{"login":"kabua","id":8376646,"avatar_url":"https://avatars.githubusercontent.com/u/8376646?v=3","gravatar_id":"","url":"https://api.github.com/users/kabua","html_url":"https://github.com/kabua","followers_url":"https://api.github.com/users/kabua/followers","following_url":"https://api.github.com/users/kabua/following{/other_user}","gists_url":"https://api.github.com/users/kabua/gists{/gist_id}","starred_url":"https://api.github.com/users/kabua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabua/subscriptions","organizations_url":"https://api.github.com/users/kabua/orgs","repos_url":"https://api.github.com/users/kabua/repos","events_url":"https://api.github.com/users/kabua/events{/privacy}","received_events_url":"https://api.github.com/users/kabua/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-29T15:06:24Z","updated_at":"2016-04-05T02:24:38Z","closed_at":"2016-04-05T02:24:38Z","body":"We are trying to understand your library, so we wrote a very simple test and didn't get the results we were expecting. Are we doing something wrong?\r\n\r\n***The Test:***\r\n\r\n    var bs1 = new BitSet(\"101\");\r\n    var ss = bs1.toString(); // expecting \"101\", actual \"101\" Note: bs1 = {length=1, [0]=5}\r\n    var a = bs1.get(1);      // expecting 0, actual 0\r\n    var b = bs1.get(2);      // expecting 1, actual 1\r\n\r\n    var bs2 = new BitSet(\"111\");\r\n    ss = bs2.toString();    // expecting \"111\", actual \"111\" Note: bs2 = {length=1, [0]=7}\r\n\r\n    var bs3 = bs2.clear(1);\r\n    ss = bs3.toString();     // expecting \"101\", actual \"1\" Note: bs3 = {length=2, [0]=1,[1]=0}\r\n    var c = bs3.get(1);      // expecting 0, actual 0\r\n    var d = bs3.get(2);      // expecting 1, actual 0\r\n    var t = bs3.equals(bs1); // expecting true, actual false\r\n\r\n\r\nWhy is bs3's length equal to 2? If we understand things correctly, we believe length should be 1 and [0] should be 5."},"comment":{"url":"https://api.github.com/repos/infusion/BitSet.js/issues/comments/205602979","html_url":"https://github.com/infusion/BitSet.js/issues/13#issuecomment-205602979","issue_url":"https://api.github.com/repos/infusion/BitSet.js/issues/13","id":205602979,"user":{"login":"infusion","id":197742,"avatar_url":"https://avatars.githubusercontent.com/u/197742?v=3","gravatar_id":"","url":"https://api.github.com/users/infusion","html_url":"https://github.com/infusion","followers_url":"https://api.github.com/users/infusion/followers","following_url":"https://api.github.com/users/infusion/following{/other_user}","gists_url":"https://api.github.com/users/infusion/gists{/gist_id}","starred_url":"https://api.github.com/users/infusion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infusion/subscriptions","organizations_url":"https://api.github.com/users/infusion/orgs","repos_url":"https://api.github.com/users/infusion/repos","events_url":"https://api.github.com/users/infusion/events{/privacy}","received_events_url":"https://api.github.com/users/infusion/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T02:24:38Z","updated_at":"2016-04-05T02:24:38Z","body":"The test is now passing. The implementation is now somewhat different."}}