Here you can find the source of assertMergeTestPostcondition(double[] arr, long[] brr, int arrLen)
private static void assertMergeTestPostcondition(double[] arr, long[] brr, int arrLen)
//package com.java2s; /*// ww w. j a v a 2s . c o m * Copyright 2015-16, Yahoo! Inc. * Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms. */ public class Main { private static void assertMergeTestPostcondition(double[] arr, long[] brr, int arrLen) { int violationsCount = 0; for (int i = 0; i < arrLen - 1; i++) { if (arr[i] > arr[i + 1]) { violationsCount++; } } for (int i = 0; i < arrLen; i++) { if (brr[i] != (long) (1e12 * (1.0 - arr[i]))) violationsCount++; } if (brr[arrLen] != 0) { violationsCount++; } assert violationsCount == 0; } }