From 9108725b74c83d8438c57e7ca78d796c35ed2ffa Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Wed, 22 Nov 2017 17:51:42 -0800 Subject: [PATCH] extname: extend testcases to 16 chars this is sufficient for all filetests to pass without truncating --- lib/cretonne/src/ir/extname.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/cretonne/src/ir/extname.rs b/lib/cretonne/src/ir/extname.rs index 290a40d9f4..36cc18d5c3 100644 --- a/lib/cretonne/src/ir/extname.rs +++ b/lib/cretonne/src/ir/extname.rs @@ -6,7 +6,7 @@ use std::fmt::{self, Write}; -const TESTCASE_NAME_LENGTH: usize = 10; +const TESTCASE_NAME_LENGTH: usize = 16; /// The name of an external is either a reference to a user-defined symbol /// table, or a short sequence of ascii bytes so that test cases do not have @@ -118,13 +118,13 @@ mod tests { assert_eq!(ExternalName::testcase("x").to_string(), "%x"); assert_eq!(ExternalName::testcase("x_1").to_string(), "%x_1"); assert_eq!( - ExternalName::testcase("long123456").to_string(), - "%long123456" + ExternalName::testcase("longname12345678").to_string(), + "%longname12345678" ); - // Constructor will silently drop bytes beyond the 10th + // Constructor will silently drop bytes beyond the 16th assert_eq!( - ExternalName::testcase("long1234567").to_string(), - "%long123456" + ExternalName::testcase("longname123456789").to_string(), + "%longname12345678" ); }