| 335 | } |
| 336 | |
| 337 | bool ValidateByteCode(asIScriptFunction *func, asBYTE *expect) |
| 338 | { |
| 339 | if (func == 0) return false; |
| 340 | asUINT len; |
| 341 | asDWORD *bc = func->GetByteCode(&len); |
| 342 | for( asUINT n = 0, i = 0; n < len; ) |
| 343 | { |
| 344 | asBYTE c = *(asBYTE*)(&bc[n]); |
| 345 | if( c != expect[i] ) |
| 346 | return false; |
| 347 | n += asBCTypeSize[asBCInfo[c].type]; |
| 348 | |
| 349 | if( expect[i++] == asBC_RET && n < len ) |
| 350 | return false; |
| 351 | } |
| 352 | |
| 353 | return true; |
| 354 | } |
| 355 | |
| 356 | string GetCurrentDir() |
| 357 | { |
no test coverage detected