[Lldb-commits] [lldb] r150854 - in /lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/map: TestDataFormatterStdMap.py main.cpp

Eric Christopher echristo at apple.com
Mon Feb 20 11:13:39 PST 2012


On Feb 20, 2012, at 11:11 AM, Enrico Granata <granata.enrico at gmail.com> wrote:

> It is. Semantics being: if any item with key=8 is in the map, return a reference to it. If not, add a new item with key=8 and value=int()=0
> 
>> -    ii[8] = 0;
>> +    ii[85] = 1234567;
> 
> After these changes, there is no item with key=8 in the map, hence the expression is going to cause the creation of such an item, with value=0. Thus, there should be no way to match 1234567 in the expression output :) 
> 

Ah right. That's fair.

>> +        self.expect("expression ii[8]", matching=False, error=True,
>> +                    substrs = ['1234567'])
> 
> For the test to succeed with ToT clang, one would have to remove the error=True clause from the expect() call, but that would cause the test to fail for everyone who *does not* have ToT clang (and I expect this latter to be a much wider audience than the former).
> We should be checking for which version of clang built the binary and have two versions of this expect call in place, one with error=True for older-than-bug-fixing-clang and one without for bug-fixing-or-greater revisions, but I guess that only makes sense once people start adopting the new clang and complaining :-)

I was thinking that you could test the same thing using si[8] instead :)

Mostly given the lack of comments I'm not quite sure what you're expecting to be tested there.

-eric




More information about the lldb-commits mailing list