News for hackers. Stuff that matters.
Re:Clang is better than GCC by nolok on Monday November 28, 2022 @01:23PM (#33777376)
> If I were the person here, I might write a simple test with 'val1="foo"; val2="bar";' to make it fail. That would make it fail because the first byte is different, while I would think it failed because the entire value is different.

This is absolutely the wrong way to do testing and the crux of what I was getting at: you should not change a single line of code within the test itself when making them pass or fail.

If you change the test itself, then it's not the same test, you have not ensured your test works, only that another test works.

I'm sorry if this sounds harsh or if my phrasing is not correct, but it's important to remember this. If "testing your test" implies "making modification to the test", then you're not doing it right.

Re:Clang is better than GCC by skribanto on Monday November 28, 2022 @06:53PM (#33781642)
That does not address the problem described in GP at all