On Thursday, November 24, 2016 15:41:12 Lucia Cojocaru via Digitalmars-d-
learn wrote:
> I was able to hack my way around it. In druntime there are other
> modules which need the exact same thing and have their own
> assertThrown template:
> https://github.com/dlang/druntime/search?utf8=%E2%9C%93&q
On Thursday, 24 November 2016 at 14:47:32 UTC, Jonathan M Davis
wrote:
On Thursday, November 24, 2016 13:42:25 Kagamin via
Digitalmars-d-learn wrote:
Linux? Probably another bug.
Try this:
unittest
{
import core.exception : UnicodeException;
void f()
{
string ret;
On Thursday, 24 November 2016 at 15:18:40 UTC, Ryan wrote:
On Thursday, 24 November 2016 at 13:42:25 UTC, Kagamin wrote:
Linux? Probably another bug.
Try this:
unittest
{
import core.exception : UnicodeException;
void f()
{
string ret;
int i = -1;
ret ~= i;
On Thursday, 24 November 2016 at 13:42:25 UTC, Kagamin wrote:
Linux? Probably another bug.
Try this:
unittest
{
import core.exception : UnicodeException;
void f()
{
string ret;
int i = -1;
ret ~= i;
}
try
{
f();
}
catch(UnicodeExcep
On Thursday, November 24, 2016 13:42:25 Kagamin via Digitalmars-d-learn
wrote:
> Linux? Probably another bug.
> Try this:
> unittest
> {
> import core.exception : UnicodeException;
> void f()
> {
> string ret;
> int i = -1;
> ret ~= i;
> }
>
> tr
Linux? Probably another bug.
Try this:
unittest
{
import core.exception : UnicodeException;
void f()
{
string ret;
int i = -1;
ret ~= i;
}
try
{
f();
}
catch(UnicodeException e)
{
assert(e.msg == "Invalid UTF-8 sequence")
Hello,
I am trying to assert the fact that a UnicodeException is thrown
by the piece of code added in this PR:
https://github.com/dlang/druntime/pull/1696/files
The unittest is in druntime/src/rt/lifetime.d:
unittest
{
import core.exception : UnicodeException;
try
{
strin