You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/05/28 22:01:20 UTC

ios commit: [CB-3469] Adding missing license found by RAT

Updated Branches:
  refs/heads/master 7bc06d59f -> 951b6cb2f


[CB-3469] Adding missing license found by RAT


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/951b6cb2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/951b6cb2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/951b6cb2

Branch: refs/heads/master
Commit: 951b6cb2f6d920b2cd28dd9598274331ad5a0d47
Parents: 7bc06d5
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue May 28 15:59:20 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue May 28 15:59:20 2013 -0400

----------------------------------------------------------------------
 CordovaLibTests/CordovaLibApp/config.xml          |   18 ++
 CordovaLibTests/ExifTests.h                       |   45 +++--
 CordovaLibTests/ExifTests.m                       |  195 +++++++++-------
 bin/templates/project/__TESTING__/config.xml      |   18 ++
 bin/templates/project/cordova/lib/sim.applescript |   17 ++
 bin/uncrustify.cfg                                |   18 ++-
 6 files changed, 204 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/951b6cb2/CordovaLibTests/CordovaLibApp/config.xml
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaLibApp/config.xml b/CordovaLibTests/CordovaLibApp/config.xml
index 3e84967..136804e 100644
--- a/CordovaLibTests/CordovaLibApp/config.xml
+++ b/CordovaLibTests/CordovaLibApp/config.xml
@@ -1,4 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
 <widget xmlns     = "http://www.w3.org/ns/widgets"
         id        = "io.cordova.helloCordova"
         version   = "2.0.0">

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/951b6cb2/CordovaLibTests/ExifTests.h
----------------------------------------------------------------------
diff --git a/CordovaLibTests/ExifTests.h b/CordovaLibTests/ExifTests.h
index b46241b..45e17c4 100644
--- a/CordovaLibTests/ExifTests.h
+++ b/CordovaLibTests/ExifTests.h
@@ -1,10 +1,21 @@
-//
-//  ExifTestTests.h
-//  ExifTestTests
-//
-//  Created by Lorin Beer on 2013-03-18.
-//
-//
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
 
 #import <SenTestingKit/SenTestingKit.h>
 
@@ -13,15 +24,15 @@
 #define ARC4RANDOM_MAX 0x100000000
 
 @interface ExifTestTests : SenTestCase {
-    CDVJpegHeaderWriter * testHeaderWriter;
-    NSNumber * testErrorThreshhold;
+    CDVJpegHeaderWriter* testHeaderWriter;
+    NSNumber* testErrorThreshhold;
 }
 
-- (void) testContinuedFractionWithUInt;
-- (void) testContinuedFractionWithUFloat;
-- (void) testContinuedFractionsWorstCase;
-- (void) testFormatHexFromDecimal;
-- (void) testFormatNumberWithLeadingZeroes;
-- (void) testUnsignedRationalToString;
-- (void) testSignedRationalToString;
-@end
\ No newline at end of file
+- (void)testContinuedFractionWithUInt;
+- (void)testContinuedFractionWithUFloat;
+- (void)testContinuedFractionsWorstCase;
+- (void)testFormatHexFromDecimal;
+- (void)testFormatNumberWithLeadingZeroes;
+- (void)testUnsignedRationalToString;
+- (void)testSignedRationalToString;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/951b6cb2/CordovaLibTests/ExifTests.m
----------------------------------------------------------------------
diff --git a/CordovaLibTests/ExifTests.m b/CordovaLibTests/ExifTests.m
index 960ac95..dfd6da4 100644
--- a/CordovaLibTests/ExifTests.m
+++ b/CordovaLibTests/ExifTests.m
@@ -1,154 +1,171 @@
-//
-//  ExifTestTests.m
-//  ExifTestTests
-//
-//  Created by Lorin Beer on 2013-03-18.
-//
-//
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
 
 #import <SenTestingKit/SenTestingKit.h>
 
 #import "ExifTestTests.h"
 #import "../ExifTest/CDVJpegHeaderWriter.m"
 
-
 @implementation ExifTestTests
 
 - (void)setUp
 {
     [super setUp];
     testHeaderWriter = [[CDVJpegHeaderWriter alloc] init];
-    testErrorThreshhold = [NSNumber numberWithDouble: 0.000001];
-    NSLog(@"%x", ~10+1);
-    
-    
+    testErrorThreshhold = [NSNumber numberWithDouble:0.000001];
+    NSLog(@"%x", ~10 + 1);
 }
 
 - (void)tearDown
 {
     // Tear-down code here.
-    
+
     [super tearDown];
 }
 
-//==================================================================================================
+// ==================================================================================================
 // rational approximation of decimal by continued fraction tests
-//==================================================================================================
+// ==================================================================================================
 
 // tests continued fraction with random int
-- (void)testContinuedFractionWithUInt {
+- (void)testContinuedFractionWithUInt
+{
     NSLog(@"Continued Fraction Test with random int value, numerator should be generated value, denominator should be 1");
-    NSNumber * numerator = @0;
-    NSNumber * denominator = @0;
-    NSNumber * testValue = [NSNumber numberWithInt: abs(arc4random())];
-    [testHeaderWriter decimalToUnsignedRational: testValue
-                  withResultNumerator: &numerator
-                withResultDenominator: &denominator];
+    NSNumber* numerator = @0;
+    NSNumber* denominator = @0;
+    NSNumber* testValue = [NSNumber numberWithInt:abs(arc4random())];
+    [testHeaderWriter decimalToUnsignedRational:testValue
+                            withResultNumerator:&numerator
+                          withResultDenominator:&denominator];
     STAssertEquals([numerator intValue],
-                   [testValue intValue],
-                   @"Numerator did not match");
+        [testValue intValue],
+        @"Numerator did not match");
     STAssertEquals([denominator intValue],
-                   1,
-                   @"denominator was not one");
+        1,
+        @"denominator was not one");
 }
 
 // tests continued fraction with random float
-- (void)testContinuedFractionWithUFloat {
+- (void)testContinuedFractionWithUFloat
+{
     NSLog(@"Continued Fraction Test with random double value, resulting fraction should be within acceptable error threshhold");
-    NSNumber * threshhold = @0.1;
-    NSNumber * numerator = @0;
-    NSNumber * denominator = @0;
-    NSLog(@"%f",((double)arc4random() / ARC4RANDOM_MAX) * 100.0f);
-    NSNumber * testValue = [NSNumber numberWithDouble:
-                                ((double)arc4random() / ARC4RANDOM_MAX) * 100.0f];
-
-    [testHeaderWriter decimalToUnsignedRational: testValue
-                            withResultNumerator: &numerator
-                          withResultDenominator: &denominator];
-    NSLog(@"%lf, %lf",[testValue doubleValue], [numerator doubleValue]/[denominator doubleValue]);
+    NSNumber* threshhold = @0.1;
+    NSNumber* numerator = @0;
+    NSNumber* denominator = @0;
+    NSLog(@"%f", ((double)arc4random() / ARC4RANDOM_MAX) * 100.0f);
+    NSNumber* testValue = [NSNumber numberWithDouble:
+        ((double)arc4random() / ARC4RANDOM_MAX) * 100.0f];
+
+    [testHeaderWriter decimalToUnsignedRational:testValue
+                            withResultNumerator:&numerator
+                          withResultDenominator:&denominator];
+    NSLog(@"%lf, %lf", [testValue doubleValue], [numerator doubleValue] / [denominator doubleValue]);
 
     STAssertEqualsWithAccuracy([testValue doubleValue],
-                               [numerator doubleValue]/[denominator doubleValue],
-                               [threshhold doubleValue],
-                               @"rational approximation did not meet acceptable error threshhold");
-    
+        [numerator doubleValue] / [denominator doubleValue],
+        [threshhold doubleValue],
+        @"rational approximation did not meet acceptable error threshhold");
 }
 
 // tests continued fraction in sqrt(2) worst case
-- (void)testContinuedFractionsWorstCase {
+- (void)testContinuedFractionsWorstCase
+{
     NSLog(@"Continued Fraction Test with provable worst case ~sqrt(2), resulting fraction should be within acceptable error threshhold");
-    NSNumber * threshhold = @0.1;
-    NSNumber * numerator = @0;
-    NSNumber * denominator = @0;
-    NSNumber * testValue = [NSNumber numberWithDouble: sqrt(2)];
-    [testHeaderWriter decimalToUnsignedRational: testValue
-                            withResultNumerator: &numerator
-                          withResultDenominator: &denominator];
+    NSNumber* threshhold = @0.1;
+    NSNumber* numerator = @0;
+    NSNumber* denominator = @0;
+    NSNumber* testValue = [NSNumber numberWithDouble:sqrt(2)];
+    [testHeaderWriter decimalToUnsignedRational:testValue
+                            withResultNumerator:&numerator
+                          withResultDenominator:&denominator];
     STAssertEqualsWithAccuracy([testValue doubleValue],
-                               [numerator doubleValue]/[denominator doubleValue],
-                               [threshhold doubleValue],
-                               @"rational approximation did not meet acceptable error threshhold");
+        [numerator doubleValue] / [denominator doubleValue],
+        [threshhold doubleValue],
+        @"rational approximation did not meet acceptable error threshhold");
 }
 
 // tests format hex from a decimal
-- (void) testFormatHexFromDecimal {
-    NSNumber * testValue = @1;
-    NSNumber * testPlaces = @8;
-    NSString * result = nil;
-    result = [testHeaderWriter formattedHexStringFromDecimalNumber: testValue
-                                                        withPlaces: testPlaces];
+- (void)testFormatHexFromDecimal
+{
+    NSNumber* testValue = @1;
+    NSNumber* testPlaces = @8;
+    NSString* result = nil;
+
+    result = [testHeaderWriter formattedHexStringFromDecimalNumber:testValue
+                                                        withPlaces:testPlaces];
     // assert not nil
     STAssertNotNil(result, @"nil renturned from formattedHexStringFromDecimalNumber");
     // assert correct number of places
     STAssertEquals([result length], [testPlaces unsignedIntegerValue],
-                   @"returned string to wrong number of places. Should be = %i Was = %i",
-                   [testPlaces intValue],
-                   [result length]);
+        @"returned string to wrong number of places. Should be = %i Was = %i",
+        [testPlaces intValue],
+        [result length]);
     // assert correct hex representation
     STAssertTrueNoThrow([result isEqualToString:@"00000001"], @"result should be equal to @00000001");
-
 }
 
 // tests format number string with leading zeroes
-- (void) testFormatNumberWithLeadingZeroes {
-    NSString * result = nil;
-    NSNumber * testValue = @8769; // Exif SubIFD Offset Tag
-    NSNumber * testPlaces = @6;
-    result = [testHeaderWriter formatNumberWithLeadingZeroes: testValue
-                                                  withPlaces: testPlaces];
+- (void)testFormatNumberWithLeadingZeroes
+{
+    NSString* result = nil;
+    NSNumber* testValue = @8769;  // Exif SubIFD Offset Tag
+    NSNumber* testPlaces = @6;
+
+    result = [testHeaderWriter formatNumberWithLeadingZeroes:testValue
+                                                  withPlaces:testPlaces];
     STAssertNotNil(result, @"nil renturned from formattedHexStringFromDecimalNumber");
     STAssertEquals([result length],
-                   [testPlaces unsignedIntegerValue],
-                   @"returned string to wrong number of places. Should be = %i Was = %i",
-                   [testPlaces intValue],
-                   [result length]);
+        [testPlaces unsignedIntegerValue],
+        @"returned string to wrong number of places. Should be = %i Was = %i",
+        [testPlaces intValue],
+        [result length]);
     // assert correct hex representation
     STAssertTrueNoThrow([result isEqualToString:@"008769"], @"result was = %@ should be = @008769", result);
 }
 
-- (void) testUnsignedRationalToString {
-    NSString * result = nil;
-    NSNumber * numerator = @1;
-    NSNumber * denominator = @10;
-    result = [testHeaderWriter formatRationalWithNumerator: numerator
-                                           withDenominator: denominator
-                                                  asSigned: FALSE];
+- (void)testUnsignedRationalToString
+{
+    NSString* result = nil;
+    NSNumber* numerator = @1;
+    NSNumber* denominator = @10;
+
+    result = [testHeaderWriter formatRationalWithNumerator:numerator
+                                           withDenominator:denominator
+                                                  asSigned:FALSE];
     NSLog(result);
     STAssertNotNil(result, @"nil returned from testUnsignedRationalToString");
-    STAssertTrueNoThrow([result length]==16, @"returned string with wrong length. Exif rationals are 8 bytes, string has %ld bytes",[result length]/2);
+    STAssertTrueNoThrow([result length] == 16, @"returned string with wrong length. Exif rationals are 8 bytes, string has %ld bytes", [result length] / 2);
     STAssertTrueNoThrow([result isEqualToString:@"000000010000000a"], @"result was = %@ should be = @0000000100000010", result);
 }
 
-- (void) testSignedRationalToString {
-    NSString * result = nil;
-    NSNumber * numerator = @-1;
-    NSNumber * denominator = @-10;
-    result = [testHeaderWriter formatRationalWithNumerator: numerator
-                                           withDenominator: denominator
-                                                  asSigned: TRUE];
+- (void)testSignedRationalToString
+{
+    NSString* result = nil;
+    NSNumber* numerator = @ - 1;
+    NSNumber* denominator = @ - 10;
+
+    result = [testHeaderWriter formatRationalWithNumerator:numerator
+                                           withDenominator:denominator
+                                                  asSigned:TRUE];
     NSLog(result);
     STAssertNotNil(result, @"nil returned from testSignedRationalToString");
-    STAssertTrueNoThrow([result length]==16, @"returned string with wrong length. Exif rationals are 8 bytes, string has %ld bytes",[result length]/2);
+    STAssertTrueNoThrow([result length] == 16, @"returned string with wrong length. Exif rationals are 8 bytes, string has %ld bytes", [result length] / 2);
     STAssertTrueNoThrow([result isEqualToString:@"fffffffffffffff6"], @"result was = %@ should be = @000000FF000000F6", result);
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/951b6cb2/bin/templates/project/__TESTING__/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/config.xml b/bin/templates/project/__TESTING__/config.xml
index ca292c8..db64661 100644
--- a/bin/templates/project/__TESTING__/config.xml
+++ b/bin/templates/project/__TESTING__/config.xml
@@ -1,4 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
 <widget xmlns     = "http://www.w3.org/ns/widgets"
         id        = "io.cordova.helloCordova"
         version   = "2.0.0">

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/951b6cb2/bin/templates/project/cordova/lib/sim.applescript
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/sim.applescript b/bin/templates/project/cordova/lib/sim.applescript
index 5f6b152..8425625 100755
--- a/bin/templates/project/cordova/lib/sim.applescript
+++ b/bin/templates/project/cordova/lib/sim.applescript
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 tell application "System Events"
 	set UI elements enabled to true
 end tell

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/951b6cb2/bin/uncrustify.cfg
----------------------------------------------------------------------
diff --git a/bin/uncrustify.cfg b/bin/uncrustify.cfg
index d52ce33..1e3099b 100644
--- a/bin/uncrustify.cfg
+++ b/bin/uncrustify.cfg
@@ -1,4 +1,20 @@
-# Uncrustify 0.59
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 # Based off of https://gist.github.com/261662/
 
 #