Skip to content

Commit

Permalink
Update quote test to support test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwvj committed Aug 18, 2016
1 parent 10dee59 commit 27f50d6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
Expand Up @@ -87,7 +87,7 @@ public void ExpressionQuote() throws IOException, InterruptedException,
CMakeGenerateException
{
generate(getPath("expressions/ExpressionQuote.vdmrt"));
compileAndTest();
compileAndTest(getTestCppFile("quote/ExpressionQuote_Tests.cpp"));
}

@ConditionalIgnore(condition = HasVdmLib.class)
Expand Down
@@ -0,0 +1,27 @@
/*
* ExpressionsSeq_Tests.cpp
*
* Created on: Jan 10, 2016
* Author: pvj
*/


#include "gtest/gtest.h"

extern "C"
{
#include "Vdm.h"
#include <stdio.h>
#include "ExpressionQuote.h"
}

#define CHECK(methodId,args...) TVP c= _Z15ExpressionQuoteEV(NULL);\
TVP res=CALL_FUNC(ExpressionQuote,ExpressionQuote,c,methodId,args);\
EXPECT_EQ (true,equals(newQuote(QUOTE_Q2),res));\
vdmFree(res);\
vdmFree(c)

TEST(ExpressionQuote, op)
{
CHECK(CLASS_ExpressionQuote__Z2opE2YQ1,newQuote(QUOTE_Q2));
}

0 comments on commit 27f50d6

Please sign in to comment.