aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libdparse/389.patch
blob: 027d2a8282a65a3780db3d63300da54bca777ca1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 052470ca738d5c683ab5511e47bdf335bf754db4 Mon Sep 17 00:00:00 2001
From: Jan Jurzitza <gh@webfreak.org>
Date: Fri, 17 Apr 2020 08:47:24 +0200
Subject: [PATCH] Fixed unittest on x86 (fix #388)

---
 src/dparse/lexer.d | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/dparse/lexer.d b/src/dparse/lexer.d
index 2661543..22ab0c1 100644
--- a/src/dparse/lexer.d
+++ b/src/dparse/lexer.d
@@ -1891,7 +1891,8 @@ unittest
 {
     assert(optimalBucketCount(1) == 2);
     assert(optimalBucketCount(9000 * 32) == 16384);
-    assert(optimalBucketCount(100_000_000_000UL) == 1 << 30);
+    static if (size_t.sizeof == ulong.sizeof)
+        assert(optimalBucketCount(100_000_000_000UL) == 1 << 30);
 }
 
 /**