[Pkg-javascript-commits] [pdf.js] 54/161: Fix coding style in test/unit/font_spec.js

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 14:16:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 6489a80dd0b9ea5cfb499b4a0559d08d3f5f9d29
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Fri Mar 14 15:38:34 2014 +0100

    Fix coding style in test/unit/font_spec.js
---
 test/unit/font_spec.js | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/test/unit/font_spec.js b/test/unit/font_spec.js
index aa50cc5..15d1ce1 100644
--- a/test/unit/font_spec.js
+++ b/test/unit/font_spec.js
@@ -10,8 +10,9 @@ describe('font', function() {
     var line = '';
     for (var i = 0, ii = bytes.length; i < ii; ++i) {
       var b = bytes[i].toString(16);
-      if (b.length < 2)
+      if (b.length < 2) {
         b = '0' + b;
+      }
       line += b.toString(16);
     }
     return line;
@@ -34,12 +35,17 @@ describe('font', function() {
     fontData.push(parseInt(hex, 16));
   }
   var bytes = new Uint8Array(fontData);
-  fontData = {getBytes: function() { return bytes; }};
+  fontData = {
+    getBytes: function() {
+      return bytes;
+    }
+  };
 
   function bytesToString(bytesArray) {
     var str = '';
-    for (var i = 0, ii = bytesArray.length; i < ii; i++)
+    for (var i = 0, ii = bytesArray.length; i < ii; i++) {
       str += String.fromCharCode(bytesArray[i]);
+    }
     return str;
   }
 
@@ -70,8 +76,9 @@ describe('font', function() {
 
       index = new CFFIndex();
       var longName = [];
-      for (var i = 0; i < 129; i++)
+      for (var i = 0; i < 129; i++) {
         longName.push(0);
+      }
       index.add(longName);
       names = parser.parseNameIndex(index);
       expect(names[0].length).toEqual(127);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list