{"action":"created","comment":{"url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/comments/53700517","id":53700517,"diff_hunk":"@@ -0,0 +1,38 @@\n+/*\n+Copyright (C) 2016 The University of Notre Dame\n+This software is distributed under the GNU General Public License.\n+See the file LICENSE for details.\n+*/\n+\n+#ifndef TESTING_H\n+#define TESTING_H\n+\n+#include \"clock.h\"\n+\n+/**\n+ * @brief The signature of a test function\n+ * @details A graphics test is a function that represents a test of one graphics feature.\n+ * It should perform draw calls to the screen that attempt to cover the different use\n+ * cases of that feature.\n+ * @return A value indicating whether the test was successful or failed\n+ */\n+typedef int (*test_func_t)(void);\n+\n+struct test_unit {\n+    const char *title;\n+    test_func_t test;\n+    clock_t runtime_bound;\n+    // TODO: NUN-14 Add type or grouping so we can run specific groups of tests\n+};\n+\n+// The list of all tests to be run when the graphics test suite is called upon\n+static struct test_unit tests[] = {","path":"src/testing.h","position":29,"original_position":29,"commit_id":"9ab3fdbc4f449bf3e18631622ac00c96fed3b35b","original_commit_id":"9ab3fdbc4f449bf3e18631622ac00c96fed3b35b","user":{"login":"kkoser","id":3112115,"avatar_url":"https://avatars.githubusercontent.com/u/3112115?v=3","gravatar_id":"","url":"https://api.github.com/users/kkoser","html_url":"https://github.com/kkoser","followers_url":"https://api.github.com/users/kkoser/followers","following_url":"https://api.github.com/users/kkoser/following{/other_user}","gists_url":"https://api.github.com/users/kkoser/gists{/gist_id}","starred_url":"https://api.github.com/users/kkoser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkoser/subscriptions","organizations_url":"https://api.github.com/users/kkoser/orgs","repos_url":"https://api.github.com/users/kkoser/repos","events_url":"https://api.github.com/users/kkoser/events{/privacy}","received_events_url":"https://api.github.com/users/kkoser/received_events","type":"User","site_admin":false},"body":"The tests array should live in the header, as this is where people will add more tests. It is not very user friendly if they have to dig through the implementation to add a test. Users should not need to know anything about the internals to add a test.\r\n\r\nAs for the static keyword, I added it to restrict the scope to only the testing module. I'm not sure what the implications of a static global in a header are, can anyone shed some light on whether this is correct?","created_at":"2016-02-22T22:00:32Z","updated_at":"2016-02-22T22:00:32Z","html_url":"https://github.com/NunyaOS/Nunya/pull/34#discussion_r53700517","pull_request_url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/NunyaOS/Nunya/pulls/comments/53700517"},"html":{"href":"https://github.com/NunyaOS/Nunya/pull/34#discussion_r53700517"},"pull_request":{"href":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34","id":60069393,"html_url":"https://github.com/NunyaOS/Nunya/pull/34","diff_url":"https://github.com/NunyaOS/Nunya/pull/34.diff","patch_url":"https://github.com/NunyaOS/Nunya/pull/34.patch","issue_url":"https://api.github.com/repos/NunyaOS/Nunya/issues/34","number":34,"state":"open","locked":false,"title":"Added testing framework","user":{"login":"kkoser","id":3112115,"avatar_url":"https://avatars.githubusercontent.com/u/3112115?v=3","gravatar_id":"","url":"https://api.github.com/users/kkoser","html_url":"https://github.com/kkoser","followers_url":"https://api.github.com/users/kkoser/followers","following_url":"https://api.github.com/users/kkoser/following{/other_user}","gists_url":"https://api.github.com/users/kkoser/gists{/gist_id}","starred_url":"https://api.github.com/users/kkoser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkoser/subscriptions","organizations_url":"https://api.github.com/users/kkoser/orgs","repos_url":"https://api.github.com/users/kkoser/repos","events_url":"https://api.github.com/users/kkoser/events{/privacy}","received_events_url":"https://api.github.com/users/kkoser/received_events","type":"User","site_admin":false},"body":"This adds the ability to create functions to test our various modules.\r\nTests can be added by adding a new entry to the tests array in testing.h.\r\nThe framework will both confirm that the tests return true, indicating\r\nthat all of their checks passed, and that the test elapsed within\r\na given amount of time.","created_at":"2016-02-21T02:23:52Z","updated_at":"2016-02-22T22:00:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99b40374479604a0658c8eb6edc95786cc4ffd81","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34/commits","review_comments_url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34/comments","review_comment_url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NunyaOS/Nunya/issues/34/comments","statuses_url":"https://api.github.com/repos/NunyaOS/Nunya/statuses/9ab3fdbc4f449bf3e18631622ac00c96fed3b35b","head":{"label":"kkoser:Testing","ref":"Testing","sha":"9ab3fdbc4f449bf3e18631622ac00c96fed3b35b","user":{"login":"kkoser","id":3112115,"avatar_url":"https://avatars.githubusercontent.com/u/3112115?v=3","gravatar_id":"","url":"https://api.github.com/users/kkoser","html_url":"https://github.com/kkoser","followers_url":"https://api.github.com/users/kkoser/followers","following_url":"https://api.github.com/users/kkoser/following{/other_user}","gists_url":"https://api.github.com/users/kkoser/gists{/gist_id}","starred_url":"https://api.github.com/users/kkoser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkoser/subscriptions","organizations_url":"https://api.github.com/users/kkoser/orgs","repos_url":"https://api.github.com/users/kkoser/repos","events_url":"https://api.github.com/users/kkoser/events{/privacy}","received_events_url":"https://api.github.com/users/kkoser/received_events","type":"User","site_admin":false},"repo":{"id":49667862,"name":"Nunya","full_name":"kkoser/Nunya","owner":{"login":"kkoser","id":3112115,"avatar_url":"https://avatars.githubusercontent.com/u/3112115?v=3","gravatar_id":"","url":"https://api.github.com/users/kkoser","html_url":"https://github.com/kkoser","followers_url":"https://api.github.com/users/kkoser/followers","following_url":"https://api.github.com/users/kkoser/following{/other_user}","gists_url":"https://api.github.com/users/kkoser/gists{/gist_id}","starred_url":"https://api.github.com/users/kkoser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkoser/subscriptions","organizations_url":"https://api.github.com/users/kkoser/orgs","repos_url":"https://api.github.com/users/kkoser/repos","events_url":"https://api.github.com/users/kkoser/events{/privacy}","received_events_url":"https://api.github.com/users/kkoser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kkoser/Nunya","description":"","fork":true,"url":"https://api.github.com/repos/kkoser/Nunya","forks_url":"https://api.github.com/repos/kkoser/Nunya/forks","keys_url":"https://api.github.com/repos/kkoser/Nunya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kkoser/Nunya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kkoser/Nunya/teams","hooks_url":"https://api.github.com/repos/kkoser/Nunya/hooks","issue_events_url":"https://api.github.com/repos/kkoser/Nunya/issues/events{/number}","events_url":"https://api.github.com/repos/kkoser/Nunya/events","assignees_url":"https://api.github.com/repos/kkoser/Nunya/assignees{/user}","branches_url":"https://api.github.com/repos/kkoser/Nunya/branches{/branch}","tags_url":"https://api.github.com/repos/kkoser/Nunya/tags","blobs_url":"https://api.github.com/repos/kkoser/Nunya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kkoser/Nunya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kkoser/Nunya/git/refs{/sha}","trees_url":"https://api.github.com/repos/kkoser/Nunya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kkoser/Nunya/statuses/{sha}","languages_url":"https://api.github.com/repos/kkoser/Nunya/languages","stargazers_url":"https://api.github.com/repos/kkoser/Nunya/stargazers","contributors_url":"https://api.github.com/repos/kkoser/Nunya/contributors","subscribers_url":"https://api.github.com/repos/kkoser/Nunya/subscribers","subscription_url":"https://api.github.com/repos/kkoser/Nunya/subscription","commits_url":"https://api.github.com/repos/kkoser/Nunya/commits{/sha}","git_commits_url":"https://api.github.com/repos/kkoser/Nunya/git/commits{/sha}","comments_url":"https://api.github.com/repos/kkoser/Nunya/comments{/number}","issue_comment_url":"https://api.github.com/repos/kkoser/Nunya/issues/comments{/number}","contents_url":"https://api.github.com/repos/kkoser/Nunya/contents/{+path}","compare_url":"https://api.github.com/repos/kkoser/Nunya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kkoser/Nunya/merges","archive_url":"https://api.github.com/repos/kkoser/Nunya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kkoser/Nunya/downloads","issues_url":"https://api.github.com/repos/kkoser/Nunya/issues{/number}","pulls_url":"https://api.github.com/repos/kkoser/Nunya/pulls{/number}","milestones_url":"https://api.github.com/repos/kkoser/Nunya/milestones{/number}","notifications_url":"https://api.github.com/repos/kkoser/Nunya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kkoser/Nunya/labels{/name}","releases_url":"https://api.github.com/repos/kkoser/Nunya/releases{/id}","deployments_url":"https://api.github.com/repos/kkoser/Nunya/deployments","created_at":"2016-01-14T18:54:13Z","updated_at":"2016-01-14T18:54:14Z","pushed_at":"2016-02-21T23:57:14Z","git_url":"git://github.com/kkoser/Nunya.git","ssh_url":"git@github.com:kkoser/Nunya.git","clone_url":"https://github.com/kkoser/Nunya.git","svn_url":"https://github.com/kkoser/Nunya","homepage":null,"size":2059,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NunyaOS:master","ref":"master","sha":"6a78b4d53dfdc965406cd73c9ab682c6fb5c78f0","user":{"login":"NunyaOS","id":16707703,"avatar_url":"https://avatars.githubusercontent.com/u/16707703?v=3","gravatar_id":"","url":"https://api.github.com/users/NunyaOS","html_url":"https://github.com/NunyaOS","followers_url":"https://api.github.com/users/NunyaOS/followers","following_url":"https://api.github.com/users/NunyaOS/following{/other_user}","gists_url":"https://api.github.com/users/NunyaOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NunyaOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NunyaOS/subscriptions","organizations_url":"https://api.github.com/users/NunyaOS/orgs","repos_url":"https://api.github.com/users/NunyaOS/repos","events_url":"https://api.github.com/users/NunyaOS/events{/privacy}","received_events_url":"https://api.github.com/users/NunyaOS/received_events","type":"Organization","site_admin":false},"repo":{"id":49665082,"name":"Nunya","full_name":"NunyaOS/Nunya","owner":{"login":"NunyaOS","id":16707703,"avatar_url":"https://avatars.githubusercontent.com/u/16707703?v=3","gravatar_id":"","url":"https://api.github.com/users/NunyaOS","html_url":"https://github.com/NunyaOS","followers_url":"https://api.github.com/users/NunyaOS/followers","following_url":"https://api.github.com/users/NunyaOS/following{/other_user}","gists_url":"https://api.github.com/users/NunyaOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NunyaOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NunyaOS/subscriptions","organizations_url":"https://api.github.com/users/NunyaOS/orgs","repos_url":"https://api.github.com/users/NunyaOS/repos","events_url":"https://api.github.com/users/NunyaOS/events{/privacy}","received_events_url":"https://api.github.com/users/NunyaOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NunyaOS/Nunya","description":"","fork":false,"url":"https://api.github.com/repos/NunyaOS/Nunya","forks_url":"https://api.github.com/repos/NunyaOS/Nunya/forks","keys_url":"https://api.github.com/repos/NunyaOS/Nunya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NunyaOS/Nunya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NunyaOS/Nunya/teams","hooks_url":"https://api.github.com/repos/NunyaOS/Nunya/hooks","issue_events_url":"https://api.github.com/repos/NunyaOS/Nunya/issues/events{/number}","events_url":"https://api.github.com/repos/NunyaOS/Nunya/events","assignees_url":"https://api.github.com/repos/NunyaOS/Nunya/assignees{/user}","branches_url":"https://api.github.com/repos/NunyaOS/Nunya/branches{/branch}","tags_url":"https://api.github.com/repos/NunyaOS/Nunya/tags","blobs_url":"https://api.github.com/repos/NunyaOS/Nunya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NunyaOS/Nunya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NunyaOS/Nunya/git/refs{/sha}","trees_url":"https://api.github.com/repos/NunyaOS/Nunya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NunyaOS/Nunya/statuses/{sha}","languages_url":"https://api.github.com/repos/NunyaOS/Nunya/languages","stargazers_url":"https://api.github.com/repos/NunyaOS/Nunya/stargazers","contributors_url":"https://api.github.com/repos/NunyaOS/Nunya/contributors","subscribers_url":"https://api.github.com/repos/NunyaOS/Nunya/subscribers","subscription_url":"https://api.github.com/repos/NunyaOS/Nunya/subscription","commits_url":"https://api.github.com/repos/NunyaOS/Nunya/commits{/sha}","git_commits_url":"https://api.github.com/repos/NunyaOS/Nunya/git/commits{/sha}","comments_url":"https://api.github.com/repos/NunyaOS/Nunya/comments{/number}","issue_comment_url":"https://api.github.com/repos/NunyaOS/Nunya/issues/comments{/number}","contents_url":"https://api.github.com/repos/NunyaOS/Nunya/contents/{+path}","compare_url":"https://api.github.com/repos/NunyaOS/Nunya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NunyaOS/Nunya/merges","archive_url":"https://api.github.com/repos/NunyaOS/Nunya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NunyaOS/Nunya/downloads","issues_url":"https://api.github.com/repos/NunyaOS/Nunya/issues{/number}","pulls_url":"https://api.github.com/repos/NunyaOS/Nunya/pulls{/number}","milestones_url":"https://api.github.com/repos/NunyaOS/Nunya/milestones{/number}","notifications_url":"https://api.github.com/repos/NunyaOS/Nunya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NunyaOS/Nunya/labels{/name}","releases_url":"https://api.github.com/repos/NunyaOS/Nunya/releases{/id}","deployments_url":"https://api.github.com/repos/NunyaOS/Nunya/deployments","created_at":"2016-01-14T18:02:40Z","updated_at":"2016-02-10T13:22:21Z","pushed_at":"2016-02-22T21:59:46Z","git_url":"git://github.com/NunyaOS/Nunya.git","ssh_url":"git@github.com:NunyaOS/Nunya.git","clone_url":"https://github.com/NunyaOS/Nunya.git","svn_url":"https://github.com/NunyaOS/Nunya","homepage":"nunyaos.github.io","size":2190,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34"},"html":{"href":"https://github.com/NunyaOS/Nunya/pull/34"},"issue":{"href":"https://api.github.com/repos/NunyaOS/Nunya/issues/34"},"comments":{"href":"https://api.github.com/repos/NunyaOS/Nunya/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/NunyaOS/Nunya/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/NunyaOS/Nunya/statuses/9ab3fdbc4f449bf3e18631622ac00c96fed3b35b"}}}}