From 83fad4c52fd27456921ef68f71e9b00e56f27bcd Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Fri, 6 May 2016 14:19:13 -0700 Subject: [PATCH] Fix equalities in scriptableResource tests --- scripts/developer/tests/scriptableResource/lib.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/developer/tests/scriptableResource/lib.js b/scripts/developer/tests/scriptableResource/lib.js index 5241d0968e..255b3bd036 100644 --- a/scripts/developer/tests/scriptableResource/lib.js +++ b/scripts/developer/tests/scriptableResource/lib.js @@ -26,8 +26,8 @@ function getFrame(callback) { } function makeFrame(state) { - if (state == Resource.State.FAILED) { throw "Failed to load frame"; } - if (state != Resource.State.FINISHED) { return; } + if (state === Resource.State.FAILED) { throw "Failed to load frame"; } + if (state !== Resource.State.FINISHED) { return; } var pictureFrameProperties = { name: 'scriptableResourceTest Picture Frame', @@ -50,7 +50,6 @@ function getFrame(callback) { position.x += - 5 * Math.sin(rads); position.z += - 5 * Math.cos(rads); - print(JSON.stringify(position)); return position; } } @@ -67,10 +66,10 @@ function prefetch(callback) { var filepath = MOVIE_URL + padded + '.jpg'; var texture = TextureCache.prefetch(filepath); frames.push(texture); - if (!texture.state == Resource.State.FINISHED) { + if (texture.state !== Resource.State.FINISHED) { numLoading++; texture.stateChanged.connect(function(state) { - if (state == Resource.State.FAILED || state == Resource.State.FINISHED) { + if (state === Resource.State.FAILED || state === Resource.State.FINISHED) { --numLoading; if (!numLoading) { callback(frames); } }