Om
do_operation.cpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Operation_DoOperation_
16 
18 
19  #ifdef Om_Macro_Test_
20 
21  #include "om/language/system.hpp"
22 
23  #ifndef Om_Macro_Precompilation_
24 
25  #include "boost/test/unit_test.hpp"
26 
27  #endif
28 
29 namespace Om {
30 
31  namespace Language {
32 
33  namespace Operation {
34 
35  BOOST_AUTO_TEST_SUITE(DoOperationTest)
36 
37  BOOST_AUTO_TEST_CASE(DefinitionTest) {
38  BOOST_CHECK_EQUAL(
39  "{do}",
40  System::Get().Evaluate("drop find {do} system")
41  );
42  }
43 
44  BOOST_AUTO_TEST_CASE(SimpleTest) {
45  BOOST_CHECK_EQUAL(
46  "{a}{bc}",
47  System::Get().Evaluate("do {<-[code points]} {abc}")
48  );
49  }
50 
51  BOOST_AUTO_TEST_SUITE_END()
52 
53  }
54 
55  }
56 
57 }
58 
59  #endif
60 
61 #else
62 
65 
66 // MARK: - Om::Language::Operation::DoOperation
67 
68  #define Type_ \
69  Om::Language::Operation::DoOperation
70 
71 // MARK: public (static)
72 
73 inline char const * Type_::GetName() {
75 }
76 
77 inline void Type_::Give(Evaluation & theEvaluation) {
78  DequoteOperation::Give(theEvaluation);
79  OperatorOperation::Give(theEvaluation);
80 }
81 
82  #undef Type_
83 
84 #endif
static System & Get()
Om header file.
Om header file.
#define Om_Language_Operation_DoOperation_GetName_()
The Om library.
Definition: code_point.hpp:26
std::auto_ptr< TheGiveable > Give(TheGiveable &)
Calls Move on the object.
Om header file.
Om header file.