| 148 | }; |
| 149 | |
| 150 | int buildModule(asIScriptEngine* engine, asIScriptContext* /* ctx */) |
| 151 | { |
| 152 | asIScriptModule *mod = engine->GetModule("TestModule", asGM_ALWAYS_CREATE); |
| 153 | mod->AddScriptSection("test", |
| 154 | "class Main \n" |
| 155 | "{ \n" |
| 156 | " private string m_string; \n" |
| 157 | " private CppObj@ m_obj; \n" |
| 158 | " Main() \n" |
| 159 | " { \n" |
| 160 | " m_string = 'Hello, '; \n" |
| 161 | |
| 162 | " CppObj aux; \n" |
| 163 | " aux.setStr('world!'); \n" |
| 164 | |
| 165 | " @m_obj = @aux; \n" |
| 166 | " } \n" |
| 167 | " void Update() \n" |
| 168 | " { \n" |
| 169 | " print(m_string); \n" |
| 170 | " print(m_obj.str()); \n" |
| 171 | " } \n" |
| 172 | "}; \n"); |
| 173 | int r = mod->Build(); |
| 174 | |
| 175 | return r; |
| 176 | } |
| 177 | |
| 178 | int buildModule2(asIScriptEngine* engine, asIScriptContext* /* ctx */) |
| 179 | { |
no test coverage detected