File: methods.testsuite

package info (click to toggle)
nice 0.9.12-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,220 kB
  • ctags: 6,894
  • sloc: java: 42,767; xml: 3,508; lisp: 1,079; sh: 736; makefile: 673; cpp: 21; awk: 3
file content (32 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// PASS
  byte->String f = Byte.toString;

/// FAIL
  byte->String f = /* /// FAIL HERE */ Byte.toString();

/// PASS
  // Static methods are not in the global scope.
  byte->String f = Byte.toString;
  String[] s = [1].map(int i => toString(i));

/// PASS
  // bug #755742
  let s1 = "abc";
  let s2 = "xyz";
  List<String> list1 = [s1, s2];
  List<String> list2 = [s1, s2];
  assert list1.equals(list2);

/// PASS
  assert foo(true).equals("1");
  assert foo(false).equals("2");
  ///Toplevel
  String foo(boolean b) =
    (b ? new Integer(1) : new Long(2)).toString();

/// PASS
  /// Toplevel
class A extends java.io.ObjectInputStream
{
  readBoolean() = false;
}