test/ruboto_gen_test.rb in ruboto-1.0.2 vs test/ruboto_gen_test.rb in ruboto-1.0.3

- old
+ new

@@ -60,12 +60,16 @@ # 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 8789.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.9 # APK was 8791.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.10 + # APK was 8575.0KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 1.7.11 + # APK was 8793.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.11 + # APK was 8820.3KB. PLATFORM: STANDALONE, ANDROID_TARGET: 19, JRuby: 1.7.12 # APK was 6689.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 9000.dev # APK was 7012.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 9000.dev + # APK was 7201.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 17, 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' @@ -74,20 +78,22 @@ '1.7.5' => 8800.0, '1.7.6' => 8800.0, '1.7.8' => 8800.0, '1.7.9' => 8800.0, '1.7.10' => 8800.0, - '9000.dev' => 7100.0, + '1.7.11' => 8800.0, + '1.7.12' => 8900.0, + '9000.dev' => 7300.0, }[JRUBY_JARS_VERSION.to_s] || 0.0 version << ", JRuby: #{JRUBY_JARS_VERSION.to_s}" else upper_limit = { 10 => 60.0, 15 => 62.0, 16 => 75.0, }[ANDROID_TARGET] || 75.0 end - lower_limit = upper_limit * 0.9 + lower_limit = upper_limit * 0.7 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 def test_gen_subclass