| 150 | } |
| 151 | |
| 152 | void ExecuteScript(const char* filename) |
| 153 | { |
| 154 | ASSERT(filename); |
| 155 | |
| 156 | ReleaseAutomatedTests(); |
| 157 | |
| 158 | ScriptFile Parser; |
| 159 | // Parser.Enable(BFC_MAKE_LOWER_CASE); |
| 160 | Parser.Enable(BFC_REMOVE_TABS); |
| 161 | Parser.Disable(BFC_REMOVE_SEMICOLON); |
| 162 | Parser.Enable(BFC_DISCARD_COMMENTS); |
| 163 | Parser.Disable(BFC_DISCARD_UNKNOWNCMDS); |
| 164 | Parser.Disable(BFC_DISCARD_INVALIDCMDS); |
| 165 | Parser.Disable(BFC_DISCARD_GLOBALCMDS); |
| 166 | |
| 167 | ParseContext Context; |
| 168 | |
| 169 | Parser.SetUserData(&Context); |
| 170 | Parser.SetParseCallback(gParseCallback); |
| 171 | if(Parser.Execute(filename)) |
| 172 | { |
| 173 | if(Context.mNbFrames && Context.mTests.GetNbEntries()) |
| 174 | { |
| 175 | gAutomatedTests = ICE_NEW(AutomatedTests)(Context); |
| 176 | } |
| 177 | } |
| 178 | } |
no test coverage detected