Android Open Source - androidtestdebug Bp Demo






From Project

Back to project page androidtestdebug.

License

The source code is released under:

MIT License

If you think the Android project androidtestdebug listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package bpdemo;
/*from w  w  w .ja v  a2 s . c om*/
import java.util.HashMap;
import java.util.Random;

public class BpDemo {
  public static void main(String[] args) {
    hitCountDemo();

    conditionalBpDemo();
    
    variableLogicalStructureDemo();
    
    new BpDemo().changeResultValue();
    
    exceptionBpDemo();
    
    classLoadBpDemo();
  }
  
  private static void hitCountDemo() {
    for (int i = 0; i < 100; ++i) {
      System.out.println(i);
    }
  }

  private static void conditionalBpDemo() {
    Random r = new Random();
    boolean terminateIt = false;

    while (!terminateIt) {
      terminateIt = r.nextBoolean();
      System.out.println(terminateIt);
    }
  }

  private static void variableLogicalStructureDemo() {
    HashMap<String, String> map = new HashMap<String, String>();
    map.put("?1", "?1??");
    map.put("?2", "?2??");
    
    String value = map.get("?1");
  }

  private int mResult = 0;
  
  public int getResult() { return mResult; }
  
  public void setResult(int value) { mResult = value; }
  
  private void changeResultValue() {
    int value = getResult();
    setResult(value + 2);
  }
  
  private static void buggyMethod() {
    throw new IllegalStateException();
  }

  private static boolean exceptionBpDemo() {
    try {
      buggyMethod();
      return true;
    } catch (Exception e) {
      return false;
    }
  }

  private static void classLoadBpDemo() {
    ClbDemoClass.testMethod();
  }
}




Java Source Code List

.????2.java
.ClbDemoClass.java
.DataDrivenDemoTest.java
.DeadLockDemo.java
.Dekker.java
.FirstDemo.java
.FirstDemo.java
.MemoryLog.java
.RaceConditionFix.java
.RaceCondition.java
.Sample1Test.java
.Sample1.java
.Sample2Test.java
.Sample2.java
.SampleSuite.java
bpdemo.BpDemo.java
bpdemo.ClbDemoClass.java
.bpdemo.java
cc.iqa.iquery.mr.By.java
cc.iqa.iquery.mr.ControlHierarchy.java
cc.iqa.iquery.mr.Plugin.java
cc.iqa.iquery.mr.QueryableDevice.java
chapter11.HelloWorld.java
com.android.example.spinner.SpinnerActivity.java
com.example.android.hcgallery.CameraFragment.java
com.example.android.hcgallery.CameraFragment.java
com.example.android.hcgallery.CameraFragment.java
com.example.android.hcgallery.CameraSample.java
com.example.android.hcgallery.CameraSample.java
com.example.android.hcgallery.CameraSample.java
com.example.android.hcgallery.ContentFragment.java
com.example.android.hcgallery.ContentFragment.java
com.example.android.hcgallery.ContentFragment.java
com.example.android.hcgallery.DirectoryCategory.java
com.example.android.hcgallery.DirectoryCategory.java
com.example.android.hcgallery.DirectoryCategory.java
com.example.android.hcgallery.DirectoryEntry.java
com.example.android.hcgallery.DirectoryEntry.java
com.example.android.hcgallery.DirectoryEntry.java
com.example.android.hcgallery.Directory.java
com.example.android.hcgallery.Directory.java
com.example.android.hcgallery.Directory.java
com.example.android.hcgallery.FitCenterFrameLayout.java
com.example.android.hcgallery.FitCenterFrameLayout.java
com.example.android.hcgallery.FitCenterFrameLayout.java
com.example.android.hcgallery.INotifyDirectoryChanged.java
com.example.android.hcgallery.INotifyDirectoryChanged.java
com.example.android.hcgallery.INotifyDirectoryChanged.java
com.example.android.hcgallery.MainActivity.java
com.example.android.hcgallery.MainActivity.java
com.example.android.hcgallery.MainActivity.java
com.example.android.hcgallery.TitlesFragment.java
com.example.android.hcgallery.TitlesFragment.java
com.example.android.hcgallery.TitlesFragment.java
com.example.tests.FirstDemo.java
.gcdemo.java
.gcdemo.java
.????.java
.???????????.java
temp.CaseErrorException.java
temp.Constants.java
temp.Login2blogTest.java
temp.UserOperationsHelper.java