{"id":2,"date":"2007-08-29T01:18:40","date_gmt":"2007-08-29T08:18:40","guid":{"rendered":""},"modified":"2012-02-20T16:48:44","modified_gmt":"2012-02-21T00:48:44","slug":"about","status":"publish","type":"page","link":"https:\/\/www.martinecker.com\/rudemocks\/about\/","title":{"rendered":"About"},"content":{"rendered":"<p class=\"MsoNormal\"><span lang=\"EN-GB\">RudeMocks is a mocking framework for C++ <\/span><span>that allows you to easily create mock objects and set up expectations on them using a record &amp; replay model by simply calling functions on the mock objects. It is inspired by C# mocking frameworks, such as <a href=\"http:\/\/www.ayende.com\/\">Rhino Mocks<\/a> and <a href=\"http:\/\/www.typemock.com\/\">TypeMock<\/a>. The goal of RudeMocks is to nearly eliminate the need to write mocks by hand when writing unit tests in C++. It is a useful library for test-driven development in C++ and makes writing unit tests almost as easy as in Java or C#. To the best of my knowledge, this is the first mocking framework of this kind available in C++.<\/span><\/p>\n<p class=\"MsoNormal\"><span>Some of the most important features of RudeMocks are:<br \/>\n<\/span><\/p>\n<ul>\n<li>Easily create mocks for\n<ul>\n<li><span>Classes with single inheritance<\/span><\/li>\n<li><span>Classes with multiple inheritance<\/span><\/li>\n<li><span>Free functions and static member functions<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span>Flexible, per-argument expectations<\/span>\n<ul>\n<li><span>Natural syntax to set up expectations (just call the functions on the mocked object as usual)<\/span><\/li>\n<li><span>Use operator == to check for equality or fall back to memcmp<\/span><\/li>\n<li><span>Ignore specific arguments or all arguments<\/span><\/li>\n<li><span>Custom constraints on any argument<\/span><\/li>\n<li><span>STL container constraints<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span>Classes need not be default constructible (although a default value for classes used as return value types needs to be provided)<\/span><\/li>\n<li><span>Fully unit tested <\/span><\/li>\n<\/ul>\n<p class=\"MsoNormal\"><span>The name RudeMocks comes from the fact that the implementation uses inline assembly, which in some C++ circles is considered a bit rude. The use of a little bit of assembly makes the implementation dependent on the compiler and the CPU architecture. The current implementation supports x86 CPUs and the Microsoft Visual C++ 8.0 compiler. Ports to gcc 4.x and other CPU architectures are underway or in preparation. <\/span><\/p>\n<p><span lang=\"EN-GB\">RudeMocks only depends on and uses the C++ standard library and <a href=\"http:\/\/www.boost.org\">Boost<\/a>. It is released under the zlib\/libpng license and can be used freely in non-commercial and commercial products.<\/span><\/p>\n<p>RudeMocks is developed by Martin Ecker who can be contacted at the email address me@&lt;thisdomain&gt;.com, or @martin_ecker on Twitter, or via <a title=\"http:\/\/www.martinecker.com\" href=\"http:\/\/www.martinecker.com\" target=\"_blank\">his website<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RudeMocks is a mocking framework for C++ that allows you to easily create mock objects and set up expectations on them using a record &amp; replay model by simply calling functions on the mock objects. It is inspired by C# mocking frameworks, such as Rhino Mocks and TypeMock. The goal of RudeMocks is to nearly [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_mi_skip_tracking":false,"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>About - RudeMocks<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.martinecker.com\/rudemocks\/about\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"About - RudeMocks\" \/>\n<meta property=\"og:description\" content=\"RudeMocks is a mocking framework for C++ that allows you to easily create mock objects and set up expectations on them using a record &amp; replay model by simply calling functions on the mock objects. It is inspired by C# mocking frameworks, such as Rhino Mocks and TypeMock. The goal of RudeMocks is to nearly [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.martinecker.com\/rudemocks\/about\/\" \/>\n<meta property=\"og:site_name\" content=\"RudeMocks\" \/>\n<meta property=\"article:modified_time\" content=\"2012-02-21T00:48:44+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.martinecker.com\/rudemocks\/about\/\",\"url\":\"https:\/\/www.martinecker.com\/rudemocks\/about\/\",\"name\":\"About - RudeMocks\",\"isPartOf\":{\"@id\":\"https:\/\/www.martinecker.com\/rudemocks\/#website\"},\"datePublished\":\"2007-08-29T08:18:40+00:00\",\"dateModified\":\"2012-02-21T00:48:44+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.martinecker.com\/rudemocks\/about\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.martinecker.com\/rudemocks\/#website\",\"url\":\"https:\/\/www.martinecker.com\/rudemocks\/\",\"name\":\"RudeMocks\",\"description\":\"The latest news on the RudeMocks C++ mocking framework.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.martinecker.com\/rudemocks\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"About - RudeMocks","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.martinecker.com\/rudemocks\/about\/","og_locale":"en_US","og_type":"article","og_title":"About - RudeMocks","og_description":"RudeMocks is a mocking framework for C++ that allows you to easily create mock objects and set up expectations on them using a record &amp; replay model by simply calling functions on the mock objects. It is inspired by C# mocking frameworks, such as Rhino Mocks and TypeMock. The goal of RudeMocks is to nearly [&hellip;]","og_url":"https:\/\/www.martinecker.com\/rudemocks\/about\/","og_site_name":"RudeMocks","article_modified_time":"2012-02-21T00:48:44+00:00","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.martinecker.com\/rudemocks\/about\/","url":"https:\/\/www.martinecker.com\/rudemocks\/about\/","name":"About - RudeMocks","isPartOf":{"@id":"https:\/\/www.martinecker.com\/rudemocks\/#website"},"datePublished":"2007-08-29T08:18:40+00:00","dateModified":"2012-02-21T00:48:44+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.martinecker.com\/rudemocks\/about\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.martinecker.com\/rudemocks\/#website","url":"https:\/\/www.martinecker.com\/rudemocks\/","name":"RudeMocks","description":"The latest news on the RudeMocks C++ mocking framework.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.martinecker.com\/rudemocks\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/comments?post=2"}],"version-history":[{"count":4,"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":14,"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/pages\/2\/revisions\/14"}],"wp:attachment":[{"href":"https:\/\/www.martinecker.com\/rudemocks\/wp-json\/wp\/v2\/media?parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}