1REQUIRES: system-windows, msvc 2RUN: %build --compiler=msvc --nodefaultlib --output=%t.exe %S/Inputs/ExpressionsTest.cpp 3RUN: not %lldb -b -s %S/Inputs/ExpressionsTest0.script -s %S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- %t.exe 2>&1 | FileCheck %s 4 5// Check the variable value through `print` 6CHECK: (lldb) print result 7CHECK: (char) $0 = '\x1c' 8 9// Call the function just like in the code 10CHECK: (lldb) print N0::N1::sum(N0::N1::buf1, sizeof(N0::N1::buf1)) 11CHECK: (char) $1 = '\x1c' 12 13// Try the relaxed namespaces search 14CHECK: (lldb) print N1::sum(N1::buf1, sizeof(N1::buf1)) 15CHECK: (char) $2 = '\x1c' 16 17// Try the relaxed variables and functions search 18CHECK: (lldb) print sum(buf1, sizeof(buf1)) 19CHECK: (char) $3 = '\x1c' 20 21// Make a crash during expression calculation 22CHECK: (lldb) print sum(buf1, 1000000000) 23CHECK: The process has been returned to the state before expression evaluation. 24 25// Make one more crash 26CHECK: (lldb) print sum(buf0, 1) 27CHECK: The process has been returned to the state before expression evaluation. 28 29// Check if the process state was restored succesfully 30CHECK: (lldb) print sum(buf0, result - 28) 31CHECK: (char) $4 = '\0' 32 33// Call the function with arbitrary parameters 34CHECK: (lldb) print sum(buf1 + 3, 3) 35CHECK: (char) $5 = '\f' 36