From ddacc25a5b3ca6c8f96ad0aa3a71758001567d99 Mon Sep 17 00:00:00 2001 From: alandonovan Date: Wed, 5 Dec 2018 14:34:39 -0500 Subject: [PATCH] starlark/testdata: fix mistakes in tests (#42) Fixes #40 --- starlark/testdata/dict.star | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/starlark/testdata/dict.star b/starlark/testdata/dict.star index 4eec1cf0..c8b1001a 100644 --- a/starlark/testdata/dict.star +++ b/starlark/testdata/dict.star @@ -74,20 +74,20 @@ assert.eq(x9a.keys()[0], (1, 2)) # dict.get x10 = {"a": 1} -assert.eq(x9.get("a"), 1) -assert.eq(x9.get("b"), None) -assert.eq(x9.get("a", 2), 1) -assert.eq(x9.get("b", 2), 2) +assert.eq(x10.get("a"), 1) +assert.eq(x10.get("b"), None) +assert.eq(x10.get("a", 2), 1) +assert.eq(x10.get("b", 2), 2) # dict.clear x11 = {"a": 1} -assert.contains(x10, "a") -assert.eq(x10["a"], 1) -x10.clear() -assert.fails(lambda: x10["a"], 'key "a" not in dict') -assert.true("a" not in x10) -freeze(x10) -assert.fails(x10.clear, "cannot clear frozen hash table") +assert.contains(x11, "a") +assert.eq(x11["a"], 1) +x11.clear() +assert.fails(lambda: x11["a"], 'key "a" not in dict') +assert.true("a" not in x11) +freeze(x11) +assert.fails(x11.clear, "cannot clear frozen hash table") # dict.setdefault x12 = {"a": 1}