test/ruboto_gen_test.rb in ruboto-0.15.0 vs test/ruboto_gen_test.rb in ruboto-0.16.0
- old
+ new
@@ -47,25 +47,28 @@
assert !File.exists?('test/src/very_new_activity_test.rb')
assert File.read('AndroidManifest.xml') !~ /VeryNewActivity/
end
end
- # APK was 58.3KB. PLATFORM: CURRENT, ANDROID_TARGET: 10
- # APK was 58.3KB. PLATFORM: CURRENT, ANDROID_TARGET: 15
- # APK was 73.1KB. PLATFORM: CURRENT, ANDROID_TARGET: 16
+ # APK was 59.6KB. PLATFORM: CURRENT, ANDROID_TARGET: 10
+ # APK was 60.2KB. PLATFORM: CURRENT, ANDROID_TARGET: 15
+ # APK was 74.9KB. PLATFORM: CURRENT, ANDROID_TARGET: 16
# APK was 57.1KB. PLATFORM: FROM_GEM, ANDROID_TARGET: 10
# APK was 7380.0KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.0
# APK was 7310.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 1.7.2
# APK was 7337.0KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.2
# APK was 7317.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.3
# APK was 7332.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.3
- # APK was 8428.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 1.7.4.dev
- # APK was 7405.8KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.4.dev
- # APK was 7420.9KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.4.dev
- # APK was 8755.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.5.dev
- # APK was 8770.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.5.dev
-
+ # APK was 8428.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 1.7.4
+ # APK was 7405.8KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.4
+ # APK was 7420.9KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.4
+ # APK was 8755.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.5
+ # APK was 8770.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.5
+ # APK was 8766.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.6
+ # APK was 8781.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.8
+ # APK was 6337.3KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 9000.dev
+ # APK was 6556.7KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 9000.dev
def test_new_apk_size_is_within_limits
apk_size = BigDecimal(File.size("#{APP_DIR}/bin/RubotoTestApp-debug.apk").to_s) / 1024
version = " PLATFORM: #{RUBOTO_PLATFORM}"
version << ", ANDROID_TARGET: #{ANDROID_TARGET}"
if RUBOTO_PLATFORM == 'STANDALONE'
@@ -73,18 +76,21 @@
'1.7.0' => ANDROID_TARGET < 15 ? 7400.0 : 7600.0,
'1.7.1' => ANDROID_TARGET < 15 ? 7400.0 : 7600.0,
'1.7.2' => 7400.0,
'1.7.3' => 7400.0,
'1.7.4' => 8500.0,
- '1.7.5.dev' => 8800.0,
- }[JRUBY_JARS_VERSION.to_s] || 8800.0
+ '1.7.5' => 8800.0,
+ '1.7.6' => 8800.0,
+ '1.7.8' => 8800.0,
+ '9000.dev' => 6600.0,
+ }[JRUBY_JARS_VERSION.to_s] || 6600.0
version << ", JRuby: #{JRUBY_JARS_VERSION.to_s}"
else
upper_limit = {
- 10 => 59.0,
- 15 => 59.1,
- 16 => 74.2,
- }[ANDROID_TARGET] || 74.2
+ 10 => 60.0,
+ 15 => 62.0,
+ 16 => 75.0,
+ }[ANDROID_TARGET] || 75.0
end
lower_limit = upper_limit * 0.9
assert apk_size <= upper_limit, "APK was larger than #{'%.1f' % upper_limit}KB: #{'%.1f' % apk_size.ceil(1)}KB.#{version}"
assert apk_size >= lower_limit, "APK was smaller than #{'%.1f' % lower_limit}KB: #{'%.1f' % apk_size.floor(1)}KB. You should lower the limit.#{version}"
end