libexpr: Replace Value::mkPath with constructor calls
The pseudo-constructor `Value::mkPath` would previously be called on an default-constructed (under-initialized) `Value` to create a properly initialized `Value` that represents a path. This change removes mkPath and constructs path `Value`s directly. Change-Id: I9021de1ff59490828f9fec6866e083996a6a6964
This commit is contained in:
@@ -45,8 +45,7 @@ TEST_F(ValuePrintingTests, tString)
|
||||
|
||||
TEST_F(ValuePrintingTests, tPath)
|
||||
{
|
||||
Value vPath;
|
||||
vPath.mkPath("/foo");
|
||||
Value vPath = {NewValueAs::path, "/foo"};
|
||||
test(vPath, "/foo");
|
||||
}
|
||||
|
||||
@@ -382,8 +381,7 @@ TEST_F(ValuePrintingTests, ansiColorsStringElided)
|
||||
|
||||
TEST_F(ValuePrintingTests, ansiColorsPath)
|
||||
{
|
||||
Value v;
|
||||
v.mkPath(CanonPath("puppy"));
|
||||
Value v = {NewValueAs::path, CanonPath("puppy")};
|
||||
|
||||
test(v,
|
||||
ANSI_GREEN "/puppy" ANSI_NORMAL,
|
||||
|
||||
Reference in New Issue
Block a user