IDEA-76599 Quickfix to change a double literal to a float literal

This commit is contained in:
anna
2012-02-10 14:15:09 +01:00
parent 992515d681
commit cb0442de53
16 changed files with 225 additions and 1 deletions
@@ -0,0 +1,7 @@
// "Convert '1e1' to float" "true"
class Test {
void bar() {
foo(1e1f);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '2.' to float" "true"
class Test {
void bar() {
foo(2.f);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '.3' to float" "true"
class Test {
void bar() {
foo(.3f);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '0.0' to float" "true"
class Test {
void bar() {
foo(0.0f);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '3.14' to float" "true"
class Test {
void bar() {
foo(3.14f);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '1e1' to float" "true"
class Test {
void bar() {
foo(1e<caret>1);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '2.' to float" "true"
class Test {
void bar() {
foo(2<caret>.);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '.3' to float" "true"
class Test {
void bar() {
foo(.<caret>3);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '0.0' to float" "true"
class Test {
void bar() {
foo(0<caret>.0);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '3.14' to float" "true"
class Test {
void bar() {
foo(3<caret>.14);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '1e-9d' to float" "false"
class Test {
void bar() {
foo(1e-9<caret>d);
}
void foo(float f){}
}
@@ -0,0 +1,7 @@
// "Convert '1e137' to float" "false"
class Test {
void bar() {
foo(1e1<caret>37);
}
void foo(float f){}
}