locked
Apparent Bug in VS2015-3 RRS feed

  • Question

  • Greetings,

    I have a suite of unit tests in one of my projects.

    Several weeks back I finalized code review, checked it all in with all tests passing.

    I do not know if update 3 is the culprit, but now two of my tests are failing:

    I have a screen capture of the debugger showing this throwing an exception, with the mouse-over value of the expression being "true". Unfortunately, this forum is not allowing me to post images until they can verify my account (I have received to emails, and cannot find any place to initiate "verification"...)

    So, I'll just put the code here, and describe the issue:

            Assert.IsTrue(tmp == true && tmp2 == true);

    Obviously, tmp and tmp2 are both bool values...and yes, I know the '== true' parts are redundant. The actual check is 'tmp == tmp2', but that fails as well. The image I have shows in the debugger that the value of the check is "true", and the exception saying that the Assert.IsTrue failed.

    For the time being, I've replaced the check with cascading 'if-else'.

    I have not found a compiler error in at least 15 years, but this certainly seems like a bug to me, and definitely has me wondering what else is not working that I have not found yet.

    Is anyone else seeing this, or can someone give me some direction on getting this resolved?

    Thanks in advance for any help,

    -Thomas

    Friday, December 16, 2016 9:37 PM

All replies

  • Hi Thomas,

    According to your description, you could upload the screenshot to the One Drive and share a link (in text format) here.

    Based on your code, in my side, I found it could run without any problems. Here is my code:

    bool tmp = true;
    bool tmp2 = true;
    Debug.WriteLine((tmp == true && tmp2 == true)+"++++++++");
    Assert.IsTrue(tmp == true && tmp2 == true);

    I am not sure whether this is your meaning.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Oscar_Wu Tuesday, December 20, 2016 2:18 AM
    Tuesday, December 20, 2016 2:17 AM
  • Oscar,

    Thank you for the response.

    The editor would not let me post links or images.

    You code is essentially the same as mine. I have assigned the value of a Boolean expression to each of the tmp values...both of which evaluate to 'true'.

    Is there a recommended way to try to report this as a bug? The image I've captured is pretty conclusive to my eyes.

    -Thomas

    Tuesday, December 20, 2016 10:30 PM
  • Hi Thomas,

    >>The editor would not let me post links or images.

    Please do not post hyperlink, just a text format.

    >>You code is essentially the same as mine. I have assigned the value of a Boolean expression to each of the tmp values...both of which evaluate to 'true'.

    Make sure tmp and tmp2 are Boolean value not a string value. Please use this code to make sure this:

    Debug.WriteLine(tmp.GetType()+"----"+tmp2.GetType());

    We could use this site to report a bug to Microsoft engineers, and you could share a link here and mark it as answer, which could help others who has the same issue as yours.

    But I do not suggest you do that, because I could not repro your issue in my side, if this is a bug, we need to repro it in two different computers (in your side and in my side). 

    And in my side I could not repro your issue, if you could share me some snippet codes, I will try my best to repro this issue.

    Let us keep in touch, looking forward to your reply.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, December 21, 2016 1:42 AM
  • Oscar,

    My tmp values are declared as shown. i.e., 'bool' type. They also show as 'bool' type in the debugger. So I cannot conceive of how a string assignment would ever get compiled.

    I will try to pair the code down to the smallest set I can reproduce the error. It may take a week or two. I'm hoping to get a little breathing room by then.

    -Thomas

    Wednesday, December 21, 2016 8:49 PM
  • Hi Thomas,

    I will wait for your response, and let us attempt to resolve this issue. I hope that I could repro your issue in my side.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 22, 2016 1:20 AM