test("$.extend(Object, Object)", function() { expect(17);  var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options =     { xnumber2: 1, xstring2: "x", xxx: "newstring" }, optionsCopy = { xnumber2: 1, xstring2: "x", xxx: "newstring" }, merged = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "x", xxx: "newstring" }, deep1 = { foo: { bar: true } }, deep1copy = { foo: { bar: true } }, deep2 = { foo: { baz: true }, foo2: document }, deep2copy = { foo: { baz: true }, foo2: document }, deepmerged = { foo: { bar: true, baz: true }, foo2: document };  jQuery.extend(settings, options); isObj( settings, merged, "Check if extended: settings must be extended" ); isObj( options, optionsCopy, "Check if not modified: options must not be modified" );  jQuery.extend(settings, null, options); isObj( settings, merged, "Check if extended: settings must be extended" ); isObj( options, optionsCopy, "Check if not modified: options must not be modified" );  jQuery.extend(true, deep1, deep2); isObj( deep1.foo, deepmerged.foo, "Check if foo: settings must be extended" ); isObj( deep2.foo, deep2copy.foo, "Check if not deep2: options must not be modified" ); equals( deep1.foo2, document, "Make sure that a deep clone was not attempted on the document" );  var target = {}; var recursive = { foo:target, bar:5 }; jQuery.extend(true, target, recursive); isObj( target, { bar:5 }, "Check to make sure a recursive obj doesn't go never-ending loop by not copying it over" );  var ret = jQuery.extend(true, { foo: [] }, { foo: [0] } ); ok( ret.foo.length == 1, "Check to make sure a value with coersion 'false' copies over when necessary to fix #1907" );  var ret = jQuery.extend(true, { foo: "1,2,3" }, { foo: [1, 2, 3] } ); ok( typeof ret.foo != "string", "Check to make sure values equal with coersion (but not actually equal) overwrite correctly" );  var ret = jQuery.extend(true, { foo:"bar" }, { foo:null } ); ok( typeof ret.foo !== 'undefined', "Make sure a null value doesn't crash with deep extend, for #1908" );  var obj = { foo:null }; jQuery.extend(true, obj, { foo:"notnull" } ); equals( obj.foo, "notnull", "Make sure a null value can be overwritten" );  function func() {} jQuery.extend(func, { key: "value" } ); equals( func.key, "value", "Verify a function can be extended" );  var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options1 =     { xnumber2: 1, xstring2: "x" }, options1Copy = { xnumber2: 1, xstring2: "x" }, options2 =     { xstring2: "xx", xxx: "newstringx" }, options2Copy = { xstring2: "xx", xxx: "newstringx" }, merged2 = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "xx", xxx: "newstringx" };  var settings = jQuery.extend({}, defaults, options1, options2); isObj( settings, merged2, "Check if extended: settings must be extended" ); isObj( defaults, defaultsCopy, "Check if not modified: options1 must not be modified" ); isObj( options1, options1Copy, "Check if not modified: options1 must not be modified" ); isObj( options2, options2Copy, "Check if not modified: options2 must not be modified" ); 
test("is(String)", function() { expect(26); ok( $('#form').is('form'), 'Check for element: A form must be a form' ); ok( !$('#form').is('div'), 'Check for element: A form is not a div' ); ok( $('#mark').is('.blog'), 'Check for class: Expected class "blog"' ); ok( !$('#mark').is('.link'), 'Check for class: Did not expect class "link"' ); ok( $('#simon').is('.blog.link'), 'Check for multiple classes: Expected classes "blog" and "link"' ); ok( !$('#simon').is('.blogTest'), 'Check for multiple classes: Expected classes "blog" and "link", but not "blogTest"' ); ok( $('#en').is('[lang="en"]'), 'Check for attribute: Expected attribute lang to be "en"' ); ok( !$('#en').is('[lang="de"]'), 'Check for attribute: Expected attribute lang to be "en", not "de"' ); ok( $('#text1').is('[type="text"]'), 'Check for attribute: Expected attribute type to be "text"' ); ok( !$('#text1').is('[type="radio"]'), 'Check for attribute: Expected attribute type to be "text", not "radio"' ); ok( $('#text2').is(':disabled'), 'Check for pseudoclass: Expected to be disabled' ); ok( !$('#text1').is(':disabled'), 'Check for pseudoclass: Expected not disabled' ); ok( $('#radio2').is(':checked'), 'Check for pseudoclass: Expected to be checked' ); ok( !$('#radio1').is(':checked'), 'Check for pseudoclass: Expected not checked' ); ok( $('#foo').is(':has(p)'), 'Check for child: Expected a child "p" element' ); ok( !$('#foo').is(':has(ul)'), 'Check for child: Did not expect "ul" element' ); ok( $('#foo').is(':has(p):has(a):has(code)'), 'Check for childs: Expected "p", "a" and "code" child elements' ); ok( !$('#foo').is(':has(p):has(a):has(code):has(ol)'), 'Check for childs: Expected "p", "a" and "code" child elements, but no "ol"' ); ok( !$('#foo').is(0), 'Expected false for an invalid expression - 0' ); ok( !$('#foo').is(null), 'Expected false for an invalid expression - null' ); ok( !$('#foo').is(''), 'Expected false for an invalid expression - ""' ); ok( !$('#foo').is(undefined), 'Expected false for an invalid expression - undefined' );   ok( $('#en').is('[lang="en"],[lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' ); ok( $('#en').is('[lang="de"],[lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' ); ok( $('#en').is('[lang="en"] , [lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' ); ok( $('#en').is('[lang="de"] , [lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' ); 
test("$.extend(Object, Object)", function() {	expect(17);	var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },		options =     { xnumber2: 1, xstring2: "x", xxx: "newstring" },		optionsCopy = { xnumber2: 1, xstring2: "x", xxx: "newstring" },		merged = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "x", xxx: "newstring" },		deep1 = { foo: { bar: true } },		deep1copy = { foo: { bar: true } },		deep2 = { foo: { baz: true }, foo2: document },		deep2copy = { foo: { baz: true }, foo2: document },		deepmerged = { foo: { bar: true, baz: true }, foo2: document };	jQuery.extend(settings, options);	isObj( settings, merged, "Check if extended: settings must be extended" );	isObj( options, optionsCopy, "Check if not modified: options must not be modified" );	jQuery.extend(settings, null, options);	isObj( settings, merged, "Check if extended: settings must be extended" );	isObj( options, optionsCopy, "Check if not modified: options must not be modified" );	jQuery.extend(true, deep1, deep2);	isObj( deep1.foo, deepmerged.foo, "Check if foo: settings must be extended" );	isObj( deep2.foo, deep2copy.foo, "Check if not deep2: options must not be modified" );	equals( deep1.foo2, document, "Make sure that a deep clone was not attempted on the document" );	var target = {};	var recursive = { foo:target, bar:5 };	jQuery.extend(true, target, recursive);	isObj( target, { bar:5 }, "Check to make sure a recursive obj doesn't go never-ending loop by not copying it over" );	var ret = jQuery.extend(true, { foo: [] }, { foo: [0] } ); // 1907	ok( ret.foo.length == 1, "Check to make sure a value with coersion 'false' copies over when necessary to fix #1907" );	var ret = jQuery.extend(true, { foo: "1,2,3" }, { foo: [1, 2, 3] } );	ok( typeof ret.foo != "string", "Check to make sure values equal with coersion (but not actually equal) overwrite correctly" );	var ret = jQuery.extend(true, { foo:"bar" }, { foo:null } );	ok( typeof ret.foo !== 'undefined', "Make sure a null value doesn't crash with deep extend, for #1908" );	var obj = { foo:null };	jQuery.extend(true, obj, { foo:"notnull" } );	equals( obj.foo, "notnull", "Make sure a null value can be overwritten" );	function func() {}	jQuery.extend(func, { key: "value" } );	equals( func.key, "value", "Verify a function can be extended" );	var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },		defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },		options1 =     { xnumber2: 1, xstring2: "x" },		options1Copy = { xnumber2: 1, xstring2: "x" },		options2 =     { xstring2: "xx", xxx: "newstringx" },		options2Copy = { xstring2: "xx", xxx: "newstringx" },		merged2 = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "xx", xxx: "newstringx" };	var settings = jQuery.extend({}, defaults, options1, options2);	isObj( settings, merged2, "Check if extended: settings must be extended" );	isObj( defaults, defaultsCopy, "Check if not modified: options1 must not be modified" );	isObj( options1, options1Copy, "Check if not modified: options1 must not be modified" );	isObj( options2, options2Copy, "Check if not modified: options2 must not be modified" );});
6056	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6056/76e3a901530609d3c4a695ccb8a48251445c6861/core.js/clean/test/unit/core.js