Skip to content

Commit

Permalink
Fixed exception tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristiancalhoun committed May 14, 2012
1 parent 5e49d54 commit 6bafe3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Specs/Core/EllipsoidSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ defineSuite([
it("throws with negative radii componenets", function() {
expect(function() {
return new Ellipsoid({
"x": -1,
"y": 0,
"z": 0
x: -1,
y: 0,
z: 0
});
}).toThrow();
});
Expand Down
4 changes: 2 additions & 2 deletions Specs/Core/EllipsoidTangentPlaneSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ defineSuite([
});

it("projectPointsOntoEllipsoid throws without positions", function () {
var ellipsoid = Ellipsoid.getUnitSphere();
var tangentPlane = new EllipsoidTangentPlane(ellipsoid, new Cartesian3(1, 0, 0));
expect(function() {
var ellipsoid = Ellipsoid.getUnitSphere();
var tangentPlane = new EllipsoidTangentPlane(ellipsoid, new Cartesian3(1, 0, 0));
tangentPlane.projectPointsOntoEllipsoid();
}).toThrow();
});
Expand Down
8 changes: 4 additions & 4 deletions Specs/Core/TimeStandardSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ defineSuite(['Core/TimeStandard', 'Core/JulianDate'], function(TimeStandard, Jul
});

it("convertUtcToTai throws an exception if time standard is not UTC", function() {
var julianDate = new JulianDate(2454832, 43233);
julianDate._timeStandard = 404;
expect(function() {
var julianDate = new JulianDate(2454832, 43233);
julianDate._timeStandard = 404;
return TimeStandard.convertUtcToTai(julianDate);
}).toThrow();
});

it("convertTaiToUtc throws an exception if time standard is not TAI", function() {
var julianDate = new JulianDate(2454832, 43233);
julianDate._timeStandard = 404;
expect(function() {
var julianDate = new JulianDate(2454832, 43233);
julianDate._timeStandard = 404;
return TimeStandard.convertTaiToUtc(julianDate);
}).toThrow();
});
Expand Down

0 comments on commit 6bafe3e

Please sign in to comment.