From 54c5a2ce28d35c3ff9eb98aa83a69ca6d0f69134 Mon Sep 17 00:00:00 2001 From: Stefan Vodita <41467371+stefanvodita@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:29:46 +0300 Subject: [PATCH] LUCENE-10182: Order assertion parameters correctly (#397) --- .../lucene/util/TestRamUsageEstimator.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/util/TestRamUsageEstimator.java b/lucene/core/src/test/org/apache/lucene/util/TestRamUsageEstimator.java index 845688eb62f..f120af50b9b 100644 --- a/lucene/core/src/test/org/apache/lucene/util/TestRamUsageEstimator.java +++ b/lucene/core/src/test/org/apache/lucene/util/TestRamUsageEstimator.java @@ -60,44 +60,44 @@ public class TestRamUsageEstimator extends LuceneTestCase { { boolean[] array = new boolean[rnd.nextInt(1024)]; - assertEquals(sizeOf(array), ramUsed(array)); - assertEquals(shallowSizeOf(array), ramUsed(array)); + assertEquals(ramUsed(array), sizeOf(array)); + assertEquals(ramUsed(array), shallowSizeOf(array)); } { char[] array = new char[rnd.nextInt(1024)]; - assertEquals(sizeOf(array), ramUsed(array)); - assertEquals(shallowSizeOf(array), ramUsed(array)); + assertEquals(ramUsed(array), sizeOf(array)); + assertEquals(ramUsed(array), shallowSizeOf(array)); } { short[] array = new short[rnd.nextInt(1024)]; - assertEquals(sizeOf(array), ramUsed(array)); - assertEquals(shallowSizeOf(array), ramUsed(array)); + assertEquals(ramUsed(array), sizeOf(array)); + assertEquals(ramUsed(array), shallowSizeOf(array)); } { int[] array = new int[rnd.nextInt(1024)]; - assertEquals(sizeOf(array), ramUsed(array)); - assertEquals(shallowSizeOf(array), ramUsed(array)); + assertEquals(ramUsed(array), sizeOf(array)); + assertEquals(ramUsed(array), shallowSizeOf(array)); } { float[] array = new float[rnd.nextInt(1024)]; - assertEquals(sizeOf(array), ramUsed(array)); - assertEquals(shallowSizeOf(array), ramUsed(array)); + assertEquals(ramUsed(array), sizeOf(array)); + assertEquals(ramUsed(array), shallowSizeOf(array)); } { long[] array = new long[rnd.nextInt(1024)]; - assertEquals(sizeOf(array), ramUsed(array)); - assertEquals(shallowSizeOf(array), ramUsed(array)); + assertEquals(ramUsed(array), sizeOf(array)); + assertEquals(ramUsed(array), shallowSizeOf(array)); } { double[] array = new double[rnd.nextInt(1024)]; - assertEquals(sizeOf(array), ramUsed(array)); - assertEquals(shallowSizeOf(array), ramUsed(array)); + assertEquals(ramUsed(array), sizeOf(array)); + assertEquals(ramUsed(array), shallowSizeOf(array)); } }