src/sap.ui.core/src/sap/ui/qunit/utils/MemoryLeakCheck.js
function(assert, mActual, mExpected, sMessage) {
		var aUnexpectedElements = [];

		for (var sId in mActual) {
			if (!mExpected[sId]) {
				aUnexpectedElements.push(mActual[sId]);
			}
		}

		// enrich with helpful info to more easily identify the leaked control
		for (var i = 0; i < aUnexpectedElements.length; i++) {
			if (typeof aUnexpectedElements[i].getText === "function") {
				aUnexpectedElements[i] += " (text: '" + aUnexpectedElements[i].getText() + "')";
			}
		}

		sMessage = sMessage + (aUnexpectedElements.length > 0 ? ". LEFTOVERS: " + aUnexpectedElements.join(", ") : "");
		assert.equal(aUnexpectedElements.length, 0, sMessage);
	}
function(assert, mActual, mExpected, sMessage) {
		var aUnexpectedElements = [];

		for (var sId in mActual) {
			if (!mExpected[sId]) {
				aUnexpectedElements.push(mActual[sId]);
			}
		}

		// enrich with helpful info to more easily identify the leaked control
		for (var i = 0; i < aUnexpectedElements.length; i++) {
			if (typeof aUnexpectedElements[i].getText === "function") {
				aUnexpectedElements[i] += " (text: '" + aUnexpectedElements[i].getText() + "')";
			}
		}

		sMessage = sMessage + (aUnexpectedElements.length > 0 ? ". LEFTOVERS: " + aUnexpectedElements.join(", ") : "");
		assert.equal(aUnexpectedElements.length, 0, sMessage);
	}
function ( assert , mActual , mExpected , sMessage ) { var aUnexpectedElements = [ ] ; for ( var sId in mActual ) { if ( ! mExpected [ sId ] ) { aUnexpectedElements . push ( mActual [ sId ] ) ; } } // enrich with helpful info to more easily identify the leaked control for ( var i = 0 ; i < aUnexpectedElements . length ; i ++ ) { if ( typeof aUnexpectedElements [ i ] . getText === "function" ) { aUnexpectedElements [ i ] += " (text: '" + aUnexpectedElements [ i ] . getText ( ) + "')" ; } } sMessage = sMessage + ( aUnexpectedElements . length > 0 ? ". LEFTOVERS: " + aUnexpectedElements . join ( ", " ) : "" ) ; assert . equal ( aUnexpectedElements . length , 0 , sMessage ) ; }
asserts that both given maps have the same entries
asserts that both given maps have the same entries