Skip to content

Commit

Permalink
updated to fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbollar committed Apr 12, 2018
1 parent 1f8b8f0 commit 31345c8
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Specs/Scene/ParticleSystemSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ defineSuite([
}).toThrowDeveloperError();
});

it('throws with invalid rate', function() {
it('throws with invalid emissionRate', function() {
var p = new ParticleSystem();
expect(function() {
p.rate = -1.0;
p.emissionRate = -1.0;
}).toThrowDeveloperError();
});

Expand Down Expand Up @@ -291,45 +291,44 @@ defineSuite([
it('throws with invalid minimumWidth', function() {
var p = new ParticleSystem();
expect(function() {
p.minimumWidth = -1.0;
p.minimumImageSize = new Cartesian2(-1.0, 2.0);
}).toThrowDeveloperError();
});

it('throws with invalid maximumWidth', function() {
var p = new ParticleSystem();
expect(function() {
p.maximumWidth = -1.0;
p.maximumImageSize = new Cartesian2(-1.0, 2.0);
}).toThrowDeveloperError();
});

it('throws with invalid minimumHeight', function() {
var p = new ParticleSystem();
expect(function() {
p.minimumHeight = -1.0;
p.minimumImageSize = new Cartesian2(2.0, -1.0);
}).toThrowDeveloperError();
});

it('throws with invalid maximumHeight', function() {
var p = new ParticleSystem();
expect(function() {
p.maximumHeight = -1.0;
p.maximumImageSize = new Cartesian2(2.0, -1.0);
}).toThrowDeveloperError();
});

it('throws with invalid lifeTime', function() {
it('throws with invalid lifetime', function() {
var p = new ParticleSystem();
expect(function() {
p.lifeTime = -1.0;
p.lifetime = -1.0;
}).toThrowDeveloperError();
});

it('renders', function() {
scene.primitives.add(new ParticleSystem({
image : greenImage,
emitter : new CircleEmitter(1.0),
rate : 10000,
width : 100,
height : 100
emissoinRate : 10000,
imageSize : new Cartesian2(100, 100)
}));
scene.camera.position = new Cartesian3(0.0, 0.0, 20.0);
scene.camera.direction = new Cartesian3(0.0, 0.0, -1.0);
Expand Down

0 comments on commit 31345c8

Please sign in to comment.