Skip to content

Commit f77c97d

Browse files
authored
Merge pull request #1222 from owen-jones-diffblue/feature/java-long-to-string
Feature/java long to string
2 parents 9dd1152 + 87007b0 commit f77c97d

File tree

179 files changed

+1419
-766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1419
-766
lines changed
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test1
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(12);
6-
assert(s.equals("12"));
7-
assert(!s.equals("12"));
6+
if (b) {
7+
assert(s.equals("12"));
8+
}
9+
else {
10+
assert(!s.equals("12"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test2
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(-23);
6-
assert(s.equals("-23"));
7-
assert(!s.equals("-23"));
6+
if (b) {
7+
assert(s.equals("-23"));
8+
}
9+
else {
10+
assert(!s.equals("-23"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test3
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MAX_VALUE);
6-
assert(s.equals("2147483647"));
7-
assert(!s.equals("2147483647"));
6+
if (b) {
7+
assert(s.equals("2147483647"));
8+
}
9+
else {
10+
assert(!s.equals("2147483647"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test4
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MIN_VALUE + 1);
6-
assert(s.equals("-2147483647"));
7-
assert(!s.equals("-2147483647"));
6+
if (b) {
7+
assert(s.equals("-2147483647"));
8+
}
9+
else {
10+
assert(!s.equals("-2147483647"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test5
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(0);
6-
assert(s.equals("0"));
7-
assert(!s.equals("0"));
6+
if (b) {
7+
assert(s.equals("0"));
8+
}
9+
else {
10+
assert(!s.equals("0"));
11+
}
812
}
913
}

regression/strings-smoke-tests/java_int_to_string/test1.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test1.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string/test2.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test2.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string/test3.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test3.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string/test4.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test4.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string/test5.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test5.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String t = Integer.toString(Integer.MIN_VALUE);
6-
assert(t.equals("-2147483648"));
7-
assert(!t.equals("-2147483648"));
6+
if (b) {
7+
assert(t.equals("-2147483648"));
8+
}
9+
else {
10+
assert(!t.equals("-2147483648"));
11+
}
812
}
913
}

regression/strings-smoke-tests/java_int_to_string_knownbug/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_binary1
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(-23, 2);
6-
assert(s.equals("-10111"));
7-
assert(!s.equals("-10111"));
6+
if (b) {
7+
assert(s.equals("-10111"));
8+
}
9+
else {
10+
assert(!s.equals("-10111"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_binary2
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MAX_VALUE, 2);
6-
assert(s.equals("1111111111111111111111111111111"));
7-
assert(!s.equals("1111111111111111111111111111111"));
6+
if (b) {
7+
assert(s.equals("1111111111111111111111111111111"));
8+
}
9+
else {
10+
assert(!s.equals("1111111111111111111111111111111"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_binary3
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MIN_VALUE + 1, 2);
6-
assert(s.equals("-1111111111111111111111111111111"));
7-
assert(!s.equals("-1111111111111111111111111111111"));
6+
if (b) {
7+
assert(s.equals("-1111111111111111111111111111111"));
8+
}
9+
else {
10+
assert(!s.equals("-1111111111111111111111111111111"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_decimal
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(-27, 10);
6-
assert(s.equals("-27"));
7-
assert(!s.equals("-27"));
6+
if (b) {
7+
assert(s.equals("-27"));
8+
}
9+
else {
10+
assert(!s.equals("-27"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_hex1
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(-27, 16);
6-
assert(s.equals("-1b"));
7-
assert(!s.equals("-1b"));
6+
if (b) {
7+
assert(s.equals("-1b"));
8+
}
9+
else {
10+
assert(!s.equals("-1b"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_hex2
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MAX_VALUE, 16);
6-
assert(s.equals("7fffffff"));
7-
assert(!s.equals("7fffffff"));
6+
if (b) {
7+
assert(s.equals("7fffffff"));
8+
}
9+
else {
10+
assert(!s.equals("7fffffff"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_hex3
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MIN_VALUE + 1, 16);
6-
assert(s.equals("-7fffffff"));
7-
assert(!s.equals("-7fffffff"));
6+
if (b) {
7+
assert(s.equals("-7fffffff"));
8+
}
9+
else {
10+
assert(!s.equals("-7fffffff"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_octal1
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(-23, 8);
6-
assert(s.equals("-27"));
7-
assert(!s.equals("-27"));
6+
if (b) {
7+
assert(s.equals("-27"));
8+
}
9+
else {
10+
assert(!s.equals("-27"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_octal2
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MAX_VALUE, 8);
6-
assert(s.equals("17777777777"));
7-
assert(!s.equals("17777777777"));
6+
if (b) {
7+
assert(s.equals("17777777777"));
8+
}
9+
else {
10+
assert(!s.equals("17777777777"));
11+
}
812
}
913
}
Binary file not shown.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
public class Test_octal3
22
{
3-
public static void main()
3+
public static void main(Boolean b)
44
{
55
String s = Integer.toString(Integer.MIN_VALUE + 1, 8);
6-
assert(s.equals("-17777777777"));
7-
assert(!s.equals("-17777777777"));
6+
if (b) {
7+
assert(s.equals("-17777777777"));
8+
}
9+
else {
10+
assert(!s.equals("-17777777777"));
11+
}
812
}
913
}

regression/strings-smoke-tests/java_int_to_string_with_radix/test_binary1.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_binary1.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string_with_radix/test_binary2.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_binary2.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string_with_radix/test_binary3.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_binary3.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string_with_radix/test_decimal.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_decimal.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string_with_radix/test_hex1.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_hex1.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string_with_radix/test_hex2.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_hex2.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string_with_radix/test_hex3.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_hex3.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

regression/strings-smoke-tests/java_int_to_string_with_radix/test_octal1.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Test_octal1.class
33
--refine-strings
44
^EXIT=10$
55
^SIGNAL=0$
6-
assertion.* line 6 .* SUCCESS$
7-
assertion.* line 7 .* FAILURE$
6+
assertion.* line 7 .* SUCCESS$
7+
assertion.* line 10 .* FAILURE$
88
--

0 commit comments

Comments
 (0)