{"id":2747,"date":"2018-08-16T17:25:15","date_gmt":"2018-08-16T15:25:15","guid":{"rendered":"http:\/\/www.final-memory.org\/?p=2747"},"modified":"2018-08-16T17:25:15","modified_gmt":"2018-08-16T15:25:15","slug":"asm-software-unittest-framework","status":"publish","type":"post","link":"https:\/\/www.final-memory.org\/?p=2747","title":{"rendered":"ASM Software Unittest Framework"},"content":{"rendered":"<p>(c) 2016 by Matthias Arndt\u00a0<a href=\"mailto:marndt@asmsoftware.de\">marndt@asmsoftware.de<\/a><\/p>\n<p>The MIT License applies to this project. Please refer to the file COPYING for details.<\/p>\n<p>The software is available on GitHub at\u00a0<a href=\"https:\/\/github.com\/simonsunnyboy\/UnittestFramework\">https:\/\/github.com\/simonsunnyboy\/UnittestFramework<\/a><\/p>\n<h2><a id=\"user-content-abstract\" class=\"anchor\" href=\"https:\/\/github.com\/simonsunnyboy\/UnittestFramework#abstract\" aria-hidden=\"true\"><\/a>Abstract<\/h2>\n<p>This is a small framework to implement unittests for software written in C. There are existing projects that offer much more functionality, this one focuses on simple usability and textual output of statistics.<\/p>\n<p>Main reason to implement this framework was that cunit was too complicated in usage and no other small free frameworks could be found.<\/p>\n<h2><a id=\"user-content-system-requirements\" class=\"anchor\" href=\"https:\/\/github.com\/simonsunnyboy\/UnittestFramework#system-requirements\" aria-hidden=\"true\"><\/a>System requirements<\/h2>\n<ul>\n<li>Cmake to build the example project<\/li>\n<li>a C99 compliant C compiler but a C90 one will do if stdint.h and stdbool.h are supplied<\/li>\n<li>any operating system of your choice<\/li>\n<\/ul>\n<h2><a id=\"user-content-using-the-test-framework\" class=\"anchor\" href=\"https:\/\/github.com\/simonsunnyboy\/UnittestFramework#using-the-test-framework\" aria-hidden=\"true\"><\/a>Using the test framework<\/h2>\n<p>A test should be a subfunction or the main function of an appropriate test executable.<\/p>\n<p>Use the macros defined in unittest.h and link your project with unittest.c<\/p>\n<p>Wrap the Test with UT_BEGIN() and UT_END() macros for proper structuring. Most commands should describe themselves.<\/p>\n<p>It is allowed to start another test for entirely different content with the UT_BEGIN() macro if the last test finished with the UT_END() macro.<\/p>\n<div id=\"facebook_like\"><iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.final-memory.org%2F%3Fp%3D2747&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:500px; height:80px;\" allowTransparency=\"true\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>(c) 2016 by Matthias Arndt\u00a0marndt@asmsoftware.de The MIT License applies to this project. Please refer to the file COPYING for details. The software is available on GitHub at\u00a0https:\/\/github.com\/simonsunnyboy\/UnittestFramework Abstract This is a small framework to implement unittests for software written in C. There are existing projects that offer much more functionality, this one focuses on simple &hellip; <a href=\"https:\/\/www.final-memory.org\/?p=2747\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;ASM Software Unittest Framework&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[76,27,24],"tags":[],"class_list":["post-2747","post","type-post","status-publish","format-standard","hentry","category-ansi-c","category-asm-software","category-linux"],"_links":{"self":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts\/2747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2747"}],"version-history":[{"count":1,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts\/2747\/revisions"}],"predecessor-version":[{"id":2748,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts\/2747\/revisions\/2748"}],"wp:attachment":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}