/* * Copyright 2012 Phil Pratt-Szeliga and other contributors * http://chirrup.org/ * * See the file LICENSE for copying permission. */ package org.trifort.rootbeer.testcases.rootbeertest.exception; import java.util.ArrayList; import java.util.List; import org.trifort.rootbeer.runtime.Kernel; import org.trifort.rootbeer.test.TestException; public class NullPointer3Test implements TestException { @Override public List<Kernel> create() { List<Kernel> jobs = new ArrayList<Kernel>(); for(int i = 0; i < 4096; ++i){ NullPointer3RunOnGpu curr = new NullPointer3RunOnGpu(); jobs.add(curr); } return jobs; } @Override public boolean catchException(Throwable thrwbl) { if(thrwbl instanceof NullPointerException){ return true; } return false; } }