当前位置: 首页>>代码示例>>Java>>正文


Java Event类代码示例

本文整理汇总了Java中gov.nasa.jpf.util.event.Event的典型用法代码示例。如果您正苦于以下问题:Java Event类的具体用法?Java Event怎么用?Java Event使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Event类属于gov.nasa.jpf.util.event包,在下文中一共展示了Event类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkPath____Z

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@MJI(noOrphanWarning=true)
public boolean checkPath____Z (MJIEnv env, int objRef){
  SystemState ss = env.getSystemState();
  EventChoiceGenerator cg = ss.getLastChoiceGeneratorOfType(EventChoiceGenerator.class);

  if (cg != null){
    Event lastEvent = cg.getNextChoice();      
    if (eventTree.checkPath(lastEvent)){
      return true;
    } else {
      log.warning("trace check for event ", lastEvent.toString(), " failed");
      return false;
    }
    
  } else {
    return false; // there should have been one
  }
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:19,代码来源:JPF_gov_nasa_jpf_EventProducer.java

示例2: map

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event map (Event e){
    String eventName = e.getName();
  
    if (eventName.equals("*")){
      System.out.println("  expanding " + eventName + " to [X,Y]");
      List<Event> list = new ArrayList<Event>();
      list.add( new Event("X"));
      list.add( new Event("Y"));
      return e.replaceWithAlternativesFrom(list);
      
    } else if (eventName.equals("<opt>")){
      System.out.println("  skipping " + eventName);
      // that's effectively event removal without changing the structure of the tree
      return e.replaceWith(new NoEvent()); 
    }

    return e;
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:20,代码来源:EventGeneratorTest.java

示例3: createRoot

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createRoot() {
  return sequence(
          event("a"),
          alternatives(
              event("1"),
              sequence(
                  event("X"),
                  event("Y")
              ),
              iteration(3,
                  event("r")
              )
          ),
          event("b"));
}
 
开发者ID:grzesuav,项目名称:jpf-core,代码行数:17,代码来源:EventTreeTest.java

示例4: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    click("$Other", true),
    click("$Next", true)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:8,代码来源:TestEvent.java

示例5: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    click("$Glasses", true),
    click("$Teeth", true)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:8,代码来源:TestEvent.java

示例6: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    click("$Disable", true),
    click("$Enable", true)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:8,代码来源:TestEvent.java

示例7: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    click("$Both_text_and_icon", true),
    click("$A_check_box_menu_item", true)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:8,代码来源:TestEvent.java

示例8: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    click("$Next", true),
    click("$Previous", true)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:8,代码来源:TestEvent.java

示例9: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    click("$Windows", true),
    click("$Mac", true)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:8,代码来源:ToolbarFrame3Test.java

示例10: createRoot

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createRoot() {
  return 
    sequence(
      event("a"),
      alternatives(
        event("1"),
        iteration(2,
          event("x")
        )
      ),
      event("b")
    );
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:15,代码来源:EventGeneratorTest.java

示例11: checkGeneratedPaths

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
protected boolean checkGeneratedPaths (EventTree m, String[] expected){
  System.out.println("event tree: ");
  m.printTree();
  
  int nMatches = 0;
  for (Event ee : m.visibleEndEvents()){
    String trace = ee.getPathString(null);
    System.out.print("checking path: \"" + trace + '"');
    
    if (!m.checkPath(ee, expected)){
      System.out.println("   UNEXPECTED");
      return false;
    } else {
      System.out.println("   OK");
    }
    
    nMatches++;
  }
  
  if (nMatches != expected.length){
    System.out.println("UNCOVERED PATH: ");
    for (int i=0; i<expected.length; i++){
      if (expected[i] != null){
        System.err.println(expected[i]);
      }
    }
    return false;
  }
  
  return true;
}
 
开发者ID:grzesuav,项目名称:jpf-core,代码行数:32,代码来源:EventTreeTest.java

示例12: testAddPath

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Test
public void testAddPath () {
  AddPathTree t = new AddPathTree();
  t.addPath(
          new Event("a"), 
          new Event("b"), 
          new Event("3"));

  String[] expected = { "abc", "ab3" };
  
  if (!checkGeneratedPaths(t, expected)){
    fail("failed to match traces");
  }
}
 
开发者ID:grzesuav,项目名称:jpf-core,代码行数:15,代码来源:EventTreeTest.java

示例13: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    selectAny("$Pet:list", false, 0, 3)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:7,代码来源:TestEvent.java

示例14: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    click("$Reset", true)
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:7,代码来源:TestEvent.java

示例15: createEventTree

import gov.nasa.jpf.util.event.Event; //导入依赖的package包/类
@Override
public Event createEventTree() {
  return sequence(
    setText("$Edit1", true, "some text")
  );
}
 
开发者ID:plum-umd,项目名称:pasket,代码行数:7,代码来源:SimpleSplitPaneTest.java


注:本文中的gov.nasa.jpf.util.event.Event类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。