Files
clang-p2996/lldb/test/API/functionalities/data-formatter/setvaluefromcstring/main.m
Jonas Devlieghere 4714215efb [lldb] Support true/false in ValueObject::SetValueFromCString (#115780)
Support "true" and "false" (and "YES" and "NO" in Objective-C) in
ValueObject::SetValueFromCString.

Fixes #112597
2024-11-12 21:18:22 -08:00

17 lines
659 B
Objective-C

#import <Foundation/Foundation.h>
int main() {
NSDictionary* dic = @{@1 : @2};
BOOL b = NO;
NSLog(@"hello world"); //% dic = self.frame().FindVariable("dic")
//% dic.SetPreferSyntheticValue(True)
//% dic.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
//% dic.SetValueFromCString("12")
//% b = self.frame().FindVariable("b")
//% b.SetValueFromCString("YES")
return 0; //% dic = self.frame().FindVariable("dic")
//% self.assertTrue(dic.GetValueAsUnsigned() == 0xC, "failed to read what I wrote")
//% b = self.frame().FindVariable("b")
//% self.assertTrue(b.GetValueAsUnsigned() == 0x0, "failed to update b")
}