示例#1
0
  void test_parse_env_execute_instruction() {
    TS_ASSERT(p->parse_env("execute_instruction"));

    TS_ASSERT(p->enabled_p(PROBE_EXECUTE_INSTRUCTION));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_ADD_METHOD));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_START_METHOD));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_LOOKUP_FAILED));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_LOAD_RUNTIME));
  }
示例#2
0
  void test_parse_env_load_runtime() {
    TS_ASSERT(p->parse_env("load_runtime"));

    TS_ASSERT(p->enabled_p(PROBE_LOAD_RUNTIME));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_ADD_METHOD));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_START_METHOD));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_LOOKUP_FAILED));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_EXECUTE_INSTRUCTION));
  }
示例#3
0
  void test_parse_env_start_method() {
    TS_ASSERT(p->parse_env("start_method"));

    TS_ASSERT(p->enabled_p(PROBE_START_METHOD));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_ADD_METHOD));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_LOOKUP_FAILED));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_EXECUTE_INSTRUCTION));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_LOAD_RUNTIME));
  }
示例#4
0
  void test_parse_env_every() {
    TS_ASSERT(p->parse_env("add_method,start_method,lookup_failed,execute_instruction,load_runtime"));

    TS_ASSERT(p->enabled_p(PROBE_ADD_METHOD));
    TS_ASSERT(p->enabled_p(PROBE_START_METHOD));
    TS_ASSERT(p->enabled_p(PROBE_LOOKUP_FAILED));
    TS_ASSERT(p->enabled_p(PROBE_EXECUTE_INSTRUCTION));
    TS_ASSERT(p->enabled_p(PROBE_LOAD_RUNTIME));
  }
示例#5
0
  void test_parse_env_all() {
    TS_ASSERT(p->parse_env("all"));

    TS_ASSERT(p->enabled_p(PROBE_ADD_METHOD));
    TS_ASSERT(p->enabled_p(PROBE_START_METHOD));
    TS_ASSERT(p->enabled_p(PROBE_LOOKUP_FAILED));
    TS_ASSERT(p->enabled_p(PROBE_EXECUTE_INSTRUCTION));
    TS_ASSERT(p->enabled_p(PROBE_LOAD_RUNTIME));
  }
示例#6
0
  void test_enabled_p_prim() {
    p->parse_env("all");

    TS_ASSERT(p->enabled_p(state, state->symbol("add_method")));
    TS_ASSERT(p->enabled_p(state, state->symbol("start_method")));
    TS_ASSERT(p->enabled_p(state, state->symbol("lookup_failed")));
    TS_ASSERT(p->enabled_p(state, state->symbol("execute_instruction")));
    TS_ASSERT(p->enabled_p(state, state->symbol("load_runtime")));
  }
示例#7
0
  void test_disable_prim() {
    p->parse_env("all");

    TS_ASSERT(p->enabled_p(PROBE_ADD_METHOD));
    TS_ASSERT(p->enabled_p(PROBE_START_METHOD));
    TS_ASSERT(p->enabled_p(PROBE_LOOKUP_FAILED));
    TS_ASSERT(p->enabled_p(PROBE_EXECUTE_INSTRUCTION));
    TS_ASSERT(p->enabled_p(PROBE_LOAD_RUNTIME));

    p->disable(state, state->symbol("add_method"));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_ADD_METHOD));

    p->disable(state, state->symbol("start_method"));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_START_METHOD));

    p->disable(state, state->symbol("lookup_failed"));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_LOOKUP_FAILED));

    p->disable(state, state->symbol("execute_instruction"));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_EXECUTE_INSTRUCTION));

    p->disable(state, state->symbol("load_runtime"));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_LOAD_RUNTIME));

    p->disable(state, state->symbol("execute_method"));
    TS_ASSERT_EQUALS(false, p->enabled_p(PROBE_EXECUTE_METHOD));
  }