Android Open Source - androidtestdebug bpdemo






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

import java.util.*;
// w  w w.j  a v a  2 s.  com
public class bpdemo {
  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);
  }
  
  public static void main(String[] args) {
    hitCountDemo();

    conditionalBpDemo();
    
    new bpdemo().changeResultValue();

    System.out.println(String.format("exceptionBpDemo returns: %1$b",
        exceptionBpDemo()));

    classLoadBpDemo();

    dropToFrameDemo();
  }

  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 buggyMethod() {
    throw new IllegalStateException();
  }

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

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

  private static void printResult(int i) {
    for (int j = 0; j < i; ++j) {
      System.out.println(i * j);
    }
  }

  private static void dropToFrameDemo() {
    for (int i = 0; i < 10; ++i) {
      printResult(i);
    }
  }
}




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