Om
system_operation.cpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Operation_SystemOperation_
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(SystemOperationTest)
36 
37  BOOST_AUTO_TEST_CASE(DefinitionTest) {
38  BOOST_CHECK_EQUAL(
39  "{system}",
40  System::Get().Evaluate("drop find {system} system")
41  );
42  }
43 
44  BOOST_AUTO_TEST_SUITE_END()
45 
46  }
47 
48  }
49 
50 }
51 
52  #endif
53 
54 #else
55 
56 // MARK: - Om::Language::Operation::SystemOperation
57 
58  #define Type_ \
59  Om::Language::Operation::SystemOperation
60 
61 // MARK: public (static)
62 
63 inline char const * Type_::GetName() {
65 }
66 
67 inline void Type_::Give(Evaluation & theEvaluation) {
68  theEvaluation.TakeQuotedProducer(
69  System::Get().GetLexicon()
70  );
71 }
72 
73  #undef Type_
74 
75 #endif
static System & Get()
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.
#define Om_Language_Operation_SystemOperation_GetName_()