20848, "lucaferranti", "assertEqual errors if associative arrays have different domains", "2022-10-13T17:55:25Z"
when comparing two associative arrays with different domains, test.assertEqual errors instead of returning false
Summary of Problem
when comparing two associative arrays with different domains, test.assertEqual errors instead of returning false
Steps to Reproduce
Source Code:
use UnitTest;
var a = ["A" => 0, "B" => 2, "C" => 3],
b = ["B" => 2, "A" => 0, "D" => 3]; // note the different key D instead of C
proc test1(test: borrowed Test) throws {
test.assertEqual(a, b);
}
UnitTest.main(); ~
Compile command:
chpl foo.chpl
Execution command:
./foo
Associated Future Test(s):
Configuration Information
- Output of
chpl --version:
chpl version 1.28.0
built with LLVM version 12.0.0
Copyright 2020-2022 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
- Output of
$CHPL_HOME/util/printchplenv --anonymize:
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: none
CHPL_HWLOC: bundled
CHPL_RE2: none
CHPL_LLVM: system
CHPL_AUX_FILESYS: none
- Back-end compiler and version, e.g.
gcc --versionorclang --version:
gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.