Description: Fix test with large amount of RAM
Author: Mikko Tommila <mikko.tommila@apfloat.org>
Origin: upstream
Forwarded: not-needed
Reviewed-by: Pierre Gruet <pgtdebian@free.fr>
Last-Update: 2020-11-18

--- a/apfloat/src/test/template/org/apfloat/internal/RawtypeNTTBuilderTest.java
+++ b/apfloat/src/test/template/org/apfloat/internal/RawtypeNTTBuilderTest.java
@@ -58,7 +58,7 @@
         long maxMemoryBlockSize = ctx.getMaxMemoryBlockSize() / sizeof(rawtype);
 
         assertTrue("Fits in cache", nttBuilder.createNTT(cacheSize / 2) instanceof RawtypeTableFNTStrategy);
-        assertTrue("Fits in memory", nttBuilder.createNTT(Util.round2down(maxMemoryBlockSize)) instanceof SixStepFNTStrategy);
+        assertTrue("Fits in memory", nttBuilder.createNTT(Util.round2down(Math.min(maxMemoryBlockSize, Integer.MAX_VALUE))) instanceof SixStepFNTStrategy);
         assertTrue("Does not fit in memory", nttBuilder.createNTT(Util.round2down(maxMemoryBlockSize * 2)) instanceof TwoPassFNTStrategy);
         assertTrue("Factor 3", nttBuilder.createNTT(3) instanceof Factor3NTTStrategy);
 
