[phobos] [D-Programming-Language/phobos] 6b0be3: Fix testAliasedString() unit test helper

GitHub via phobos phobos at puremagic.com
Sun Feb 14 06:10:22 PST 2016


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: 6b0be3b89fd45d4f1d395e7173abedefa7476809
      https://github.com/D-Programming-Language/phobos/commit/6b0be3b89fd45d4f1d395e7173abedefa7476809
  Author: David Nadlinger <code at klickverbot.at>
  Date:   2016-02-14 (Sun, 14 Feb 2016)

  Changed paths:
    M std/string.d
    M std/uni.d

  Log Message:
  -----------
  Fix testAliasedString() unit test helper

Many of the functions for which this wrapper is used return
string ranges. Comparing these for object identity does not
make a lot of sense.

This is actually an issue, because toUTF, which is used in quite
a few of the tested functions, contains a void-initialized buffer,
so the identity comparison is not guaranteed to succeed. The tests
just so happen to pass on current DMD regardless, but this is not
the case for an optimized LDC build.


  Commit: 6c71d3e41ef9be381c983c7c4bc015896951a7c1
      https://github.com/D-Programming-Language/phobos/commit/6c71d3e41ef9be381c983c7c4bc015896951a7c1
  Author: Jonathan M Davis <jmdavisProg at gmx.com>
  Date:   2016-02-14 (Sun, 14 Feb 2016)

  Changed paths:
    M std/string.d
    M std/uni.d

  Log Message:
  -----------
  Merge pull request #3998 from klickverbot/fix-toutf-compare-tests

Fix testAliasedString() unit test helper


Compare: https://github.com/D-Programming-Language/phobos/compare/8388e5e1512a...6c71d3e41ef9


More information about the phobos mailing list