mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 08:31:04 +01:00
Rename dashes in a few test files to underscores (#2170)
This is somewhat https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/cpp_style_guide.md#file-names, but in general, underscores are more consistent.
This commit is contained in:
Vendored
+1
-1
@@ -28,7 +28,7 @@ class Point {
|
||||
|
||||
fn Main() -> i32 {
|
||||
let p: Point = Point.Origin();
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/addr/fail-method-let.carbon:[[@LINE+1]]: method GetSetX requires its receiver to be an lvalue
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/addr/fail_method_let.carbon:[[@LINE+1]]: method GetSetX requires its receiver to be an lvalue
|
||||
var x: auto = p.GetSetX(42);
|
||||
if (p.x == 42) {
|
||||
return x;
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
package ExplorerTest api;
|
||||
|
||||
class C {
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/addr/fail-method-me-misspelled.carbon:[[@LINE+1]]: illegal binding pattern in implicit parameter list
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/addr/fail_method_me_misspelled.carbon:[[@LINE+1]]: illegal binding pattern in implicit parameter list
|
||||
fn F[addr mew: Self*]() {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ class Point {
|
||||
|
||||
fn Main() -> i32 {
|
||||
var p: Point = Point.Origin();
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/addr/fail-method-me-type.carbon:[[@LINE+1]]: type error in method access, receiver type: 'class Point' is not implicitly convertible to 'class Shape'
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/addr/fail_method_me_type.carbon:[[@LINE+1]]: type error in method access, receiver type: 'class Point' is not implicitly convertible to 'class Shape'
|
||||
var x: auto = p.GetSetX(42);
|
||||
if (p.x == 42) {
|
||||
return x;
|
||||
+1
-1
@@ -13,7 +13,7 @@ __mixin M1 {
|
||||
fn F1[me: Self](x: Self) -> Self{
|
||||
return x;
|
||||
}
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-circular-mixing.carbon:[[@LINE+1]]: 'M3' has not been declared yet
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_circular_mixing.carbon:[[@LINE+1]]: 'M3' has not been declared yet
|
||||
__mix M3;
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ __mixin M {
|
||||
class C {
|
||||
let F: i32 = 0;
|
||||
__mix M;
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-field-member-name-clash.carbon:[[@LINE+1]]: Member named F (declared at {{.*}}/explorer/testdata/mixin/fail-field-member-name-clash.carbon:16) cannot be mixed into C because it clashes with an existing member with the same name (declared at {{.*}}/explorer/testdata/mixin/fail-field-member-name-clash.carbon:20)
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_field_member_name_clash.carbon:[[@LINE+1]]: Member named F (declared at {{.*}}/explorer/testdata/mixin/fail_field_member_name_clash.carbon:16) cannot be mixed into C because it clashes with an existing member with the same name (declared at {{.*}}/explorer/testdata/mixin/fail_field_member_name_clash.carbon:20)
|
||||
}
|
||||
|
||||
fn Main() -> i32 {
|
||||
+1
-1
@@ -21,7 +21,7 @@ class C {
|
||||
return x;
|
||||
}
|
||||
__mix M;
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-method-member-name-clash.carbon:[[@LINE+1]]: Member named F (declared at {{.*}}/explorer/testdata/mixin/fail-method-member-name-clash.carbon:16) cannot be mixed into C because it clashes with an existing member with the same name (declared at {{.*}}/explorer/testdata/mixin/fail-method-member-name-clash.carbon:22)
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_method_member_name_clash.carbon:[[@LINE+1]]: Member named F (declared at {{.*}}/explorer/testdata/mixin/fail_method_member_name_clash.carbon:16) cannot be mixed into C because it clashes with an existing member with the same name (declared at {{.*}}/explorer/testdata/mixin/fail_method_member_name_clash.carbon:22)
|
||||
}
|
||||
|
||||
fn Main() -> i32 {
|
||||
+1
-1
@@ -13,7 +13,7 @@ package ExplorerTest api;
|
||||
__mixin Operations {}
|
||||
|
||||
fn Main() -> i32 {
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-mix-as-type-expr.carbon:[[@LINE+1]]: Expected a type, but got mixin Operations
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_mix_as_type_expr.carbon:[[@LINE+1]]: Expected a type, but got mixin Operations
|
||||
var a: Operations;
|
||||
return 0;
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@ __mixin M3 {
|
||||
class C {
|
||||
__mix M2;
|
||||
__mix M3;
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-mix-diamond-clash.carbon:[[@LINE+1]]: Member named F1 (declared at {{.*}}/explorer/testdata/mixin/fail-mix-diamond-clash.carbon:15) is being mixed multiple times into C
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_mix_diamond_clash.carbon:[[@LINE+1]]: Member named F1 (declared at {{.*}}/explorer/testdata/mixin/fail_mix_diamond_clash.carbon:15) is being mixed multiple times into C
|
||||
}
|
||||
|
||||
fn Main() -> i32 {
|
||||
+1
-1
@@ -16,7 +16,7 @@ __mixin Operations {
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-mix-in-global.carbon:[[@LINE+1]]: syntax error, unexpected MIX, expecting END_OF_FILE
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_mix_in_global.carbon:[[@LINE+1]]: syntax error, unexpected MIX, expecting END_OF_FILE
|
||||
__mix Operations;
|
||||
|
||||
class Point {
|
||||
Vendored
+1
-1
@@ -21,7 +21,7 @@ interface A {
|
||||
}
|
||||
|
||||
external impl i32 as A {
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-mix-in-impl.carbon:[[@LINE+1]]: syntax error, unexpected MIX, expecting ALIAS or FN or RIGHT_CURLY_BRACE
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_mix_in_impl.carbon:[[@LINE+1]]: syntax error, unexpected MIX, expecting ALIAS or FN or RIGHT_CURLY_BRACE
|
||||
__mix Operations;
|
||||
fn F() {}
|
||||
}
|
||||
+1
-1
@@ -23,7 +23,7 @@ __mixin M2 {
|
||||
class C {
|
||||
__mix M1;
|
||||
__mix M2;
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-mix-members-clash.carbon:[[@LINE+1]]: Member named F1 (declared at {{.*}}/explorer/testdata/mixin/fail-mix-members-clash.carbon:20) cannot be mixed into C because it clashes with an existing member with the same name (declared at {{.*}}/explorer/testdata/mixin/fail-mix-members-clash.carbon:15)
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_mix_members_clash.carbon:[[@LINE+1]]: Member named F1 (declared at {{.*}}/explorer/testdata/mixin/fail_mix_members_clash.carbon:20) cannot be mixed into C because it clashes with an existing member with the same name (declared at {{.*}}/explorer/testdata/mixin/fail_mix_members_clash.carbon:15)
|
||||
}
|
||||
|
||||
fn Main() -> i32 {
|
||||
+1
-1
@@ -14,7 +14,7 @@ __mixin M1 {
|
||||
return x;
|
||||
}
|
||||
__mix M1;
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-recursive-mixing.carbon:[[@LINE+1]]: Member named F1 (declared at {{.*}}/explorer/testdata/mixin/fail-recursive-mixing.carbon:15) is being mixed multiple times into M1
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_recursive_mixing.carbon:[[@LINE+1]]: Member named F1 (declared at {{.*}}/explorer/testdata/mixin/fail_recursive_mixing.carbon:15) is being mixed multiple times into M1
|
||||
}
|
||||
|
||||
class C {
|
||||
+1
-1
@@ -38,7 +38,7 @@ class Complex {
|
||||
fn Main() -> i32 {
|
||||
var p: Point = Point.Origin();
|
||||
var c: Complex = {.r = 42, .i = 1};
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail-self-substitution.carbon:[[@LINE+1]]: type error in call: 'class Complex' is not implicitly convertible to 'class Point'
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/mixin/fail_self_substitution.carbon:[[@LINE+1]]: type error in call: 'class Complex' is not implicitly convertible to 'class Point'
|
||||
var p1: Point = p.F(c);
|
||||
|
||||
return p1.x - 42;
|
||||
Vendored
Reference in New Issue
Block a user