test/ruboto_gen_test.rb in ruboto-0.13.0 vs test/ruboto_gen_test.rb in ruboto-0.14.0
- old
+ new
@@ -19,13 +19,13 @@
end
end
def test_icons_are_updated
Dir.chdir APP_DIR do
- assert_equal 4032, File.size('res/drawable-hdpi/ic_launcher.png')
- assert_equal 2548, File.size('res/drawable-mdpi/ic_launcher.png')
- assert_equal 1748, File.size('res/drawable-ldpi/ic_launcher.png')
+ assert_equal 3834, File.size('res/drawable-hdpi/ic_launcher.png')
+ assert_equal 2513, File.size('res/drawable-mdpi/ic_launcher.png')
+ assert_equal 1689, File.size('res/drawable-ldpi/ic_launcher.png')
end
end
def test_activity_with_number_in_name
Dir.chdir APP_DIR do
@@ -59,27 +59,29 @@
# 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 8512.7KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.5.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'
upper_limit = {
'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,
- }[JRUBY_JARS_VERSION.to_s] || 8500.0
+ '1.7.4' => 8500.0,
+ }[JRUBY_JARS_VERSION.to_s] || 8600.0
version << ", JRuby: #{JRUBY_JARS_VERSION.to_s}"
else
upper_limit = {
10 => 58.0,
- 15 => 59.0,
- 16 => 74.0,
- }[ANDROID_TARGET] || 74.0
+ 15 => 59.1,
+ 16 => 74.2,
+ }[ANDROID_TARGET] || 74.2
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