Преглед на файлове

EAGLESIX-2716 Added a new test case, added a TODO.

Tony Ennis преди 11 години
родител
ревизия
b724aaaf01
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 1 1
      lib/pipeline/expressions/SetIsSubsetExpression.js
  2. 4 0
      test/lib/pipeline/expressions/SetIsSubsetExpression.js

+ 1 - 1
lib/pipeline/expressions/SetIsSubsetExpression.js

@@ -43,7 +43,7 @@ var setIsSubsetHelper = function setIsSubsetHelper(lhs, rhs){
 	// do not short-circuit when lhs.size() > rhs.size()
 	// because lhs can have redundant entries
 	for (var i = 0; i < lhs.length; i++){
-		if (rkeys.indexOf(JSON.stringify(lhs[i])) < 0) {
+		if (rkeys.indexOf(JSON.stringify(lhs[i])) < 0) { //TODO Why do we stringify the lhs and not the rhs?
 			return false
 		}
 	}

+ 4 - 0
test/lib/pipeline/expressions/SetIsSubsetExpression.js

@@ -122,6 +122,10 @@ module.exports = {
 
 			"should ignore dups in the source": function(){
 				this.compare([1,2,1], [1,2], true);
+			},
+
+			"should know the difference between a number and a string": function(){
+				this.compare([1], ["1"], true);
 			}
 
 		}