{"action":"created","comment":{"url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/comments/53573038","id":53573038,"diff_hunk":"@@ -0,0 +1,53 @@\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+#include \"testing.h\"\n+\n+#include \"console.h\"\n+\n+// A flag used to record the return value of the most recent test\n+static int recent_test_result = 1;\n+\n+// A function to time a specific test\n+// Returns the amount of time that elapsed during the test\n+clock_t time_test(tester test) {\n+\tclock_t start = clock_read();\n+\trecent_test_result = (test)();\n+\tclock_t end = clock_read();\n+\treturn clock_diff(start, end);\n+}\n+\n+// A test runner\n+// Returns true if a test was executed in a passing amount of time\n+int run_test(struct test_runner *runner) {","path":"src/testing.c","position":25,"original_position":25,"commit_id":"ddca38c2ad796b88c8ef7473da683a11aa5e7ff1","original_commit_id":"ddca38c2ad796b88c8ef7473da683a11aa5e7ff1","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":"You mean like just run them, and print the overall results as opposed to the pass/fail for individual tests? So you would get like a running 10 tests, 10 tests passed? Could be useful. I think maybe a separate PR?","created_at":"2016-02-21T20:47:05Z","updated_at":"2016-02-21T20:47:05Z","html_url":"https://github.com/NunyaOS/Nunya/pull/34#discussion_r53573038","pull_request_url":"https://api.github.com/repos/NunyaOS/Nunya/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/NunyaOS/Nunya/pulls/comments/53573038"},"html":{"href":"https://github.com/NunyaOS/Nunya/pull/34#discussion_r53573038"},"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-21T20:47:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a62ff129f097d100ee34aa64589b1804e4ce92cb","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/ddca38c2ad796b88c8ef7473da683a11aa5e7ff1","head":{"label":"kkoser:Testing","ref":"Testing","sha":"ddca38c2ad796b88c8ef7473da683a11aa5e7ff1","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-21T02:23:26Z","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":2056,"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-21T19:21:53Z","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":2149,"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/ddca38c2ad796b88c8ef7473da683a11aa5e7ff1"}}}}