blob: 1772f23c983835f0ac4e8f47c77fa250b4a7cd5e [file] [log] [blame]
Mads Ager418d1ca2017-05-22 09:35:49 +02001// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4package floating_point_annotations;
5
6public class FloatingPointValuedAnnotationTest {
7
8 @FloatingPointValuedAnnotation(doubleValue = -0d)
9 class A {
10 }
11
12 @FloatingPointValuedAnnotation(doubleValue = 0d)
13 class B {
14 }
15
16 @FloatingPointValuedAnnotation(floatValue = -0f)
17 class C {
18 }
19
20 @FloatingPointValuedAnnotation(floatValue = 0f)
21 class D {
22 }
23
24 public static void main(String[] args) {
25 System.out.println(A.class.getAnnotation(FloatingPointValuedAnnotation.class)
26 .equals(B.class.getAnnotation(FloatingPointValuedAnnotation.class)));
27
28 System.out.println(C.class.getAnnotation(FloatingPointValuedAnnotation.class)
29 .equals(D.class.getAnnotation(FloatingPointValuedAnnotation.class)));
30 }
31}