public static void testAll(Context context) { remove_all(); add_alert(null, "high alert 1", true, 180, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "high alert 2", true, 200, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "high alert 3", true, 220, true, 10, null, 0, 0, true, 20, true, true); print_all(); AlertType a1 = get_highest_active_alert(context, 190); Log.d(TAG, "a1 = " + a1.toString()); AlertType a2 = get_highest_active_alert(context, 210); Log.d(TAG, "a2 = " + a2.toString()); AlertType a3 = get_alert(a1.uuid); Log.d(TAG, "a1 == a3 ? need to see true " + (a1==a3) + a1 + " " + a3); add_alert(null, "low alert 1", false, 80, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "low alert 2", false, 60, true, 10, null, 0, 0, true, 20, true, true); AlertType al1 = get_highest_active_alert(context, 90); Log.d(TAG, "al1 should be null " + al1); al1 = get_highest_active_alert(context, 80); Log.d(TAG, "al1 = " + al1.toString()); AlertType al2 = get_highest_active_alert(context, 50); Log.d(TAG, "al2 = " + al2.toString()); Log.d(TAG, "HigherAlert(a1, a2) = a1?" + (HigherAlert(a1,a2) == a2)); Log.d(TAG, "HigherAlert(al1, al2) = al1?" + (HigherAlert(al1,al2) == al2)); Log.d(TAG, "HigherAlert(a1, al1) = al1?" + (HigherAlert(a1,al1) == al1)); Log.d(TAG, "HigherAlert(al1, a2) = al1?" + (HigherAlert(al1,a2) == al1)); // Make sure we do not influance on real data... remove_all(); }
public static void testAll(Context context) { remove_all(); add_alert(null, "high alert 1", true, 180, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "high alert 2", true, 200, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "high alert 3", true, 220, true, 10, null, 0, 0, true, 20, true, true); print_all(); AlertType a1 = get_highest_active_alert(context, 190); Log.d(TAG, "a1 = " + a1.toString()); AlertType a2 = get_highest_active_alert(context, 210); Log.d(TAG, "a2 = " + a2.toString()); AlertType a3 = get_alert(a1.uuid); Log.d(TAG, "a1 == a3 ? need to see true " + (a1==a3) + a1 + " " + a3); add_alert(null, "low alert 1", false, 80, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "low alert 2", false, 60, true, 10, null, 0, 0, true, 20, true, true); AlertType al1 = get_highest_active_alert(context, 90); Log.d(TAG, "al1 should be null " + al1); al1 = get_highest_active_alert(context, 80); Log.d(TAG, "al1 = " + al1.toString()); AlertType al2 = get_highest_active_alert(context, 50); Log.d(TAG, "al2 = " + al2.toString()); Log.d(TAG, "HigherAlert(a1, a2) = a1?" + (HigherAlert(a1,a2) == a2)); Log.d(TAG, "HigherAlert(al1, al2) = al1?" + (HigherAlert(al1,al2) == al2)); Log.d(TAG, "HigherAlert(a1, al1) = al1?" + (HigherAlert(a1,al1) == al1)); Log.d(TAG, "HigherAlert(al1, a2) = al1?" + (HigherAlert(al1,a2) == al1)); // Make sure we do not influance on real data... remove_all(); }
public static void testAll(Context context) { remove_all(); add_alert(null, "high alert 1", true, 180, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "high alert 2", true, 200, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "high alert 3", true, 220, true, 10, null, 0, 0, true, 20, true, true); print_all(); AlertType a1 = get_highest_active_alert(context, 190); Log.d(TAG, "a1 = " + a1.toString()); AlertType a2 = get_highest_active_alert(context, 210); Log.d(TAG, "a2 = " + a2.toString()); AlertType a3 = get_alert(a1.uuid); Log.d(TAG, "a1 == a3 ? need to see true " + (a1==a3) + a1 + " " + a3); add_alert(null, "low alert 1", false, 80, true, 10, null, 0, 0, true, 20, true, true); add_alert(null, "low alert 2", false, 60, true, 10, null, 0, 0, true, 20, true, true); AlertType al1 = get_highest_active_alert(context, 90); Log.d(TAG, "al1 should be null " + al1); al1 = get_highest_active_alert(context, 80); Log.d(TAG, "al1 = " + al1.toString()); AlertType al2 = get_highest_active_alert(context, 50); Log.d(TAG, "al2 = " + al2.toString()); Log.d(TAG, "HigherAlert(a1, a2) = a1?" + (HigherAlert(a1,a2) == a2)); Log.d(TAG, "HigherAlert(al1, al2) = al1?" + (HigherAlert(al1,al2) == al2)); Log.d(TAG, "HigherAlert(a1, al1) = al1?" + (HigherAlert(a1,al1) == al1)); Log.d(TAG, "HigherAlert(al1, a2) = al1?" + (HigherAlert(al1,a2) == al1)); // Make sure we do not influance on real data... remove_all(); }