mirror of
https://github.com/NASAWorldWind/WebWorldWind.git
synced 2026-01-25 15:23:04 +00:00
33 lines
886 B
JavaScript
33 lines
886 B
JavaScript
/*
|
|
* Copyright (C) 2014 United States Government as represented by the Administrator of the
|
|
* National Aeronautics and Space Administration. All Rights Reserved.
|
|
*/
|
|
require({
|
|
baseUrl: '/test/'
|
|
},[
|
|
'test/CatchTest',
|
|
'src/formats/kml/KmlObject'
|
|
], function(
|
|
CatchTest,
|
|
KmlObject
|
|
){
|
|
TestCase("KmlObjectTestCase", {
|
|
"testUndefinedNode": CatchTest(function() {
|
|
try {
|
|
new KmlObject();
|
|
fail("Exception should have been thrown");
|
|
} catch(e) {
|
|
assertEquals("ArgumentError", e.name);
|
|
}
|
|
}),
|
|
|
|
testNullNode: CatchTest(function() {
|
|
try {
|
|
new KmlObject(null,{});
|
|
fail("Exception should have been thrown");
|
|
} catch(e) {
|
|
assertEquals("ArgumentError", e.name);
|
|
}
|
|
})
|
|
});
|
|
}); |