{"action":"opened","issue":{"url":"https://api.github.com/repos/Zomis/Brainduck/issues/54","repository_url":"https://api.github.com/repos/Zomis/Brainduck","labels_url":"https://api.github.com/repos/Zomis/Brainduck/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/Zomis/Brainduck/issues/54/comments","events_url":"https://api.github.com/repos/Zomis/Brainduck/issues/54/events","html_url":"https://github.com/Zomis/Brainduck/issues/54","id":176623590,"number":54,"title":"Test cases for loops","user":{"login":"Zomis","id":1405379,"avatar_url":"https://avatars.githubusercontent.com/u/1405379?v=3","gravatar_id":"","url":"https://api.github.com/users/Zomis","html_url":"https://github.com/Zomis","followers_url":"https://api.github.com/users/Zomis/followers","following_url":"https://api.github.com/users/Zomis/following{/other_user}","gists_url":"https://api.github.com/users/Zomis/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomis/subscriptions","organizations_url":"https://api.github.com/users/Zomis/orgs","repos_url":"https://api.github.com/users/Zomis/repos","events_url":"https://api.github.com/users/Zomis/events{/privacy}","received_events_url":"https://api.github.com/users/Zomis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Zomis/Brainduck/labels/dsl","name":"dsl","color":"006b75"},{"url":"https://api.github.com/repos/Zomis/Brainduck/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/Zomis/Brainduck/labels/tests","name":"tests","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-13T12:09:13Z","updated_at":"2016-09-13T12:09:13Z","closed_at":null,"body":"It would be nice to be able to test that loops do what they are supposed to do\r\n\r\nAs a simple example consider the code:\r\n\r\n    $ nextLoop 'testable-loop'\r\n    [+++>++>-]\r\n\r\nand the DSL:\r\n\r\n    $ {\r\n         test 'testable-loop' memory '3 x4 5 2 0 1' expect '3 7 7 1 0 x0'\r\n         test 'testable-loop' memory '3 x4 5 2 0 2 0 1' expect '3 7 7 1 0 4 2 x0'\r\n    }\r\n\r\n`x` indicates the memory cell pointer.\r\n\r\nBoth the above tests should then pass.\r\n\r\nCould be useful to test some loops in http://codereview.stackexchange.com/q/57382/31562 , for example to perform one fizz-buzz loop, process one Fizz, etc.\r\n\r\nThis has potential to be extended quite a bit, for example with expect `*`, asserting that pointer never leaves the allocated memory, and probably more.\r\n\r\nNamed memory cells might be useful for parts of this ( #14 )"}}
{"actor":{"display_login":"Zomis"}}