1 /* $NetBSD: opt_cs.c,v 1.6 2022/04/24 09:04:12 rillig Exp $ */ 2 3 /* 4 * Tests for the options '-cs' and '-ncs'. 5 * 6 * The option '-cs' forces a space after the parentheses of a cast. 7 * 8 * The option '-ncs' removes all whitespace after the parentheses of a cast. 9 */ 10 11 //indent input 12 int i0 = (int)3.0; 13 int i1 = (int) 3.0; 14 int i3 = (int) 3.0; 15 //indent end 16 17 //indent run -cs 18 int i0 = (int) 3.0; 19 int i1 = (int) 3.0; 20 int i3 = (int) 3.0; 21 //indent end 22 23 //indent run -ncs 24 int i0 = (int)3.0; 25 int i1 = (int)3.0; 26 int i3 = (int)3.0; 27 //indent end 28 29 30 //indent input 31 struct s s3 = (struct s) s; 32 struct s *ptr = (struct s *) s; 33 union u u3 = (union u) u; 34 enum e e3 = (enum e) e; 35 //indent end 36 37 //indent run -cs 38 struct s s3 = (struct s) s; 39 struct s *ptr = (struct s *) s; 40 union u u3 = (union u) u; 41 enum e e3 = (enum e) e; 42 //indent end 43 44 //indent run -ncs 45 struct s s3 = (struct s)s; 46 struct s *ptr = (struct s *)s; 47 union u u3 = (union u)u; 48 enum e e3 = (enum e)e; 49 //indent end 50