aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuliano Procida <gprocida@google.com>2023-11-13 18:13:38 +0000
committerGiuliano Procida <gprocida@google.com>2023-11-15 09:21:00 +0000
commit826da9f4d6a0c9c999a81d15d4335349a0945d28 (patch)
tree9d9d73002863ed2fc031b6cf28fec92046e6a6f0
parent85724a7b086f2d56627b44bdf17eb19c034bf76f (diff)
downloadstg-826da9f4d6a0c9c999a81d15d4335349a0945d28.tar.gz
test cases: change "par" to "parameter" in function/methods test case
This was an unhelpful abbreviation. PiperOrigin-RevId: 582004572 Change-Id: I53dd779b2338bf32cbe475d4892a28e866b5c101
-rw-r--r--test_cases/diff_tests/function/expected/methods_cc.o_o_flat22
-rw-r--r--test_cases/diff_tests/function/expected/methods_cc.o_o_plain24
-rw-r--r--test_cases/diff_tests/function/expected/methods_cc.o_o_small14
-rw-r--r--test_cases/diff_tests/function/expected/methods_cc.o_o_viz48
-rw-r--r--test_cases/diff_tests/function/methods.0.cc16
-rw-r--r--test_cases/diff_tests/function/methods.1.cc16
6 files changed, 70 insertions, 70 deletions
diff --git a/test_cases/diff_tests/function/expected/methods_cc.o_o_flat b/test_cases/diff_tests/function/expected/methods_cc.o_o_flat
index 4cf02a1..dbd4bd7 100644
--- a/test_cases/diff_tests/function/expected/methods_cc.o_o_flat
+++ b/test_cases/diff_tests/function/expected/methods_cc.o_o_flat
@@ -1,23 +1,18 @@
-function symbol 'int Func::remove_par(struct Func*, int)' {_ZN4Func10remove_parEi} was removed
-
function symbol 'int Func::rename_old(struct Func*)' {_ZN4Func10rename_oldEv} was removed
-function symbol 'int Func::change_par_type(struct Func*, int)' {_ZN4Func15change_par_typeEi} was removed
+function symbol 'int Func::add_parameter(struct Func*)' {_ZN4Func13add_parameterEv} was removed
-function symbol 'int Func::add_par(struct Func*)' {_ZN4Func7add_parEv} was removed
+function symbol 'int Func::remove_parameter(struct Func*, int)' {_ZN4Func16remove_parameterEi} was removed
-function symbol 'int Func::remove_par(struct Func*)' {_ZN4Func10remove_parEv} was added
+function symbol 'int Func::change_parameter_type(struct Func*, int)' {_ZN4Func21change_parameter_typeEi} was removed
function symbol 'int Func::rename_new(struct Func*)' {_ZN4Func10rename_newEv} was added
-function symbol 'int Func::change_par_type(struct Func*, long)' {_ZN4Func15change_par_typeEl} was added
+function symbol 'int Func::add_parameter(struct Func*, int)' {_ZN4Func13add_parameterEi} was added
-function symbol 'int Func::add_par(struct Func*, int)' {_ZN4Func7add_parEi} was added
+function symbol 'int Func::remove_parameter(struct Func*)' {_ZN4Func16remove_parameterEv} was added
-function symbol 'int Func::change_par_name(struct Func*, int)' {_ZN4Func15change_par_nameEi} changed
- type 'int(struct Func*, int)' changed
- parameter 1 type 'struct Func*' changed
- pointed-to type 'struct Func' changed
+function symbol 'int Func::change_parameter_type(struct Func*, long)' {_ZN4Func21change_parameter_typeEl} was added
function symbol changed from 'int Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv} to 'long Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv}
type changed from 'int(struct Func*)' to 'long(struct Func*)'
@@ -25,6 +20,11 @@ function symbol changed from 'int Func::change_return_type(struct Func*)' {_ZN4F
parameter 1 type 'struct Func*' changed
pointed-to type 'struct Func' changed
+function symbol 'int Func::change_parameter_name(struct Func*, int)' {_ZN4Func21change_parameter_nameEi} changed
+ type 'int(struct Func*, int)' changed
+ parameter 1 type 'struct Func*' changed
+ pointed-to type 'struct Func' changed
+
variable symbol 'struct Func var' changed
type 'struct Func' changed
diff --git a/test_cases/diff_tests/function/expected/methods_cc.o_o_plain b/test_cases/diff_tests/function/expected/methods_cc.o_o_plain
index b01a06f..4d37693 100644
--- a/test_cases/diff_tests/function/expected/methods_cc.o_o_plain
+++ b/test_cases/diff_tests/function/expected/methods_cc.o_o_plain
@@ -1,30 +1,30 @@
-function symbol 'int Func::remove_par(struct Func*, int)' {_ZN4Func10remove_parEi} was removed
-
function symbol 'int Func::rename_old(struct Func*)' {_ZN4Func10rename_oldEv} was removed
-function symbol 'int Func::change_par_type(struct Func*, int)' {_ZN4Func15change_par_typeEi} was removed
+function symbol 'int Func::add_parameter(struct Func*)' {_ZN4Func13add_parameterEv} was removed
-function symbol 'int Func::add_par(struct Func*)' {_ZN4Func7add_parEv} was removed
+function symbol 'int Func::remove_parameter(struct Func*, int)' {_ZN4Func16remove_parameterEi} was removed
-function symbol 'int Func::remove_par(struct Func*)' {_ZN4Func10remove_parEv} was added
+function symbol 'int Func::change_parameter_type(struct Func*, int)' {_ZN4Func21change_parameter_typeEi} was removed
function symbol 'int Func::rename_new(struct Func*)' {_ZN4Func10rename_newEv} was added
-function symbol 'int Func::change_par_type(struct Func*, long)' {_ZN4Func15change_par_typeEl} was added
+function symbol 'int Func::add_parameter(struct Func*, int)' {_ZN4Func13add_parameterEi} was added
-function symbol 'int Func::add_par(struct Func*, int)' {_ZN4Func7add_parEi} was added
+function symbol 'int Func::remove_parameter(struct Func*)' {_ZN4Func16remove_parameterEv} was added
-function symbol 'int Func::change_par_name(struct Func*, int)' {_ZN4Func15change_par_nameEi} changed
- type 'int(struct Func*, int)' changed
+function symbol 'int Func::change_parameter_type(struct Func*, long)' {_ZN4Func21change_parameter_typeEl} was added
+
+function symbol changed from 'int Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv} to 'long Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv}
+ type changed from 'int(struct Func*)' to 'long(struct Func*)'
+ return type changed from 'int' to 'long'
parameter 1 type 'struct Func*' changed
pointed-to type 'struct Func' changed
byte size changed from 4 to 8
member changed from 'int x' to 'long x'
type changed from 'int' to 'long'
-function symbol changed from 'int Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv} to 'long Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv}
- type changed from 'int(struct Func*)' to 'long(struct Func*)'
- return type changed from 'int' to 'long'
+function symbol 'int Func::change_parameter_name(struct Func*, int)' {_ZN4Func21change_parameter_nameEi} changed
+ type 'int(struct Func*, int)' changed
parameter 1 type 'struct Func*' changed
pointed-to type 'struct Func' changed
(already reported)
diff --git a/test_cases/diff_tests/function/expected/methods_cc.o_o_small b/test_cases/diff_tests/function/expected/methods_cc.o_o_small
index 7594f5a..7b40276 100644
--- a/test_cases/diff_tests/function/expected/methods_cc.o_o_small
+++ b/test_cases/diff_tests/function/expected/methods_cc.o_o_small
@@ -1,18 +1,18 @@
-function symbol 'int Func::remove_par(struct Func*, int)' {_ZN4Func10remove_parEi} was removed
-
function symbol 'int Func::rename_old(struct Func*)' {_ZN4Func10rename_oldEv} was removed
-function symbol 'int Func::change_par_type(struct Func*, int)' {_ZN4Func15change_par_typeEi} was removed
+function symbol 'int Func::add_parameter(struct Func*)' {_ZN4Func13add_parameterEv} was removed
-function symbol 'int Func::add_par(struct Func*)' {_ZN4Func7add_parEv} was removed
+function symbol 'int Func::remove_parameter(struct Func*, int)' {_ZN4Func16remove_parameterEi} was removed
-function symbol 'int Func::remove_par(struct Func*)' {_ZN4Func10remove_parEv} was added
+function symbol 'int Func::change_parameter_type(struct Func*, int)' {_ZN4Func21change_parameter_typeEi} was removed
function symbol 'int Func::rename_new(struct Func*)' {_ZN4Func10rename_newEv} was added
-function symbol 'int Func::change_par_type(struct Func*, long)' {_ZN4Func15change_par_typeEl} was added
+function symbol 'int Func::add_parameter(struct Func*, int)' {_ZN4Func13add_parameterEi} was added
+
+function symbol 'int Func::remove_parameter(struct Func*)' {_ZN4Func16remove_parameterEv} was added
-function symbol 'int Func::add_par(struct Func*, int)' {_ZN4Func7add_parEi} was added
+function symbol 'int Func::change_parameter_type(struct Func*, long)' {_ZN4Func21change_parameter_typeEl} was added
function symbol changed from 'int Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv} to 'long Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv}
type changed from 'int(struct Func*)' to 'long(struct Func*)'
diff --git a/test_cases/diff_tests/function/expected/methods_cc.o_o_viz b/test_cases/diff_tests/function/expected/methods_cc.o_o_viz
index 44f2158..4204760 100644
--- a/test_cases/diff_tests/function/expected/methods_cc.o_o_viz
+++ b/test_cases/diff_tests/function/expected/methods_cc.o_o_viz
@@ -1,42 +1,42 @@
digraph "ABI diff" {
"0" [shape=rectangle, label="'interface'"]
- "1" [color=red, label="removed(int Func::remove_par(struct Func*, int) {_ZN4Func10remove_parEi})"]
+ "1" [color=red, label="removed(int Func::rename_old(struct Func*) {_ZN4Func10rename_oldEv})"]
"0" -> "1" [label=""]
- "2" [color=red, label="removed(int Func::rename_old(struct Func*) {_ZN4Func10rename_oldEv})"]
+ "2" [color=red, label="removed(int Func::add_parameter(struct Func*) {_ZN4Func13add_parameterEv})"]
"0" -> "2" [label=""]
- "3" [color=red, label="removed(int Func::change_par_type(struct Func*, int) {_ZN4Func15change_par_typeEi})"]
+ "3" [color=red, label="removed(int Func::remove_parameter(struct Func*, int) {_ZN4Func16remove_parameterEi})"]
"0" -> "3" [label=""]
- "4" [color=red, label="removed(int Func::add_par(struct Func*) {_ZN4Func7add_parEv})"]
+ "4" [color=red, label="removed(int Func::change_parameter_type(struct Func*, int) {_ZN4Func21change_parameter_typeEi})"]
"0" -> "4" [label=""]
- "5" [color=red, label="added(int Func::remove_par(struct Func*) {_ZN4Func10remove_parEv})"]
+ "5" [color=red, label="added(int Func::rename_new(struct Func*) {_ZN4Func10rename_newEv})"]
"0" -> "5" [label=""]
- "6" [color=red, label="added(int Func::rename_new(struct Func*) {_ZN4Func10rename_newEv})"]
+ "6" [color=red, label="added(int Func::add_parameter(struct Func*, int) {_ZN4Func13add_parameterEi})"]
"0" -> "6" [label=""]
- "7" [color=red, label="added(int Func::change_par_type(struct Func*, long) {_ZN4Func15change_par_typeEl})"]
+ "7" [color=red, label="added(int Func::remove_parameter(struct Func*) {_ZN4Func16remove_parameterEv})"]
"0" -> "7" [label=""]
- "8" [color=red, label="added(int Func::add_par(struct Func*, int) {_ZN4Func7add_parEi})"]
+ "8" [color=red, label="added(int Func::change_parameter_type(struct Func*, long) {_ZN4Func21change_parameter_typeEl})"]
"0" -> "8" [label=""]
- "9" [label="'int Func::change_par_name(struct Func*, int)' {_ZN4Func15change_par_nameEi}"]
- "10" [label="'int(struct Func*, int)'"]
- "11" [label="'struct Func*'"]
- "12" [color=red, shape=rectangle, label="'struct Func'"]
- "12" -> "12:0"
- "12:0" [color=red, label="byte size changed from 4 to 8"]
- "13" [label="'int x' -> 'long x'"]
- "14" [color=red, label="'int' -> 'long'"]
+ "9" [label="'int Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv} -> 'long Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv}"]
+ "10" [label="'int(struct Func*)' -> 'long(struct Func*)'"]
+ "11" [color=red, label="'int' -> 'long'"]
+ "10" -> "11" [label="return"]
+ "12" [label="'struct Func*'"]
+ "13" [color=red, shape=rectangle, label="'struct Func'"]
+ "13" -> "13:0"
+ "13:0" [color=red, label="byte size changed from 4 to 8"]
+ "14" [label="'int x' -> 'long x'"]
+ "14" -> "11" [label=""]
"13" -> "14" [label=""]
- "12" -> "13" [label=""]
- "11" -> "12" [label="pointed-to"]
- "10" -> "11" [label="parameter 1"]
+ "12" -> "13" [label="pointed-to"]
+ "10" -> "12" [label="parameter 1"]
"9" -> "10" [label=""]
"0" -> "9" [label=""]
- "15" [label="'int Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv} -> 'long Func::change_return_type(struct Func*)' {_ZN4Func18change_return_typeEv}"]
- "16" [label="'int(struct Func*)' -> 'long(struct Func*)'"]
- "16" -> "14" [label="return"]
- "16" -> "11" [label="parameter 1"]
+ "15" [label="'int Func::change_parameter_name(struct Func*, int)' {_ZN4Func21change_parameter_nameEi}"]
+ "16" [label="'int(struct Func*, int)'"]
+ "16" -> "12" [label="parameter 1"]
"15" -> "16" [label=""]
"0" -> "15" [label=""]
"17" [label="'struct Func var'"]
- "17" -> "12" [label=""]
+ "17" -> "13" [label=""]
"0" -> "17" [label=""]
}
diff --git a/test_cases/diff_tests/function/methods.0.cc b/test_cases/diff_tests/function/methods.0.cc
index ded056b..b9aaab6 100644
--- a/test_cases/diff_tests/function/methods.0.cc
+++ b/test_cases/diff_tests/function/methods.0.cc
@@ -3,20 +3,20 @@ struct Func {
int change_return_type();
// add or remove
- int add_par();
- int remove_par(int remove);
- int change_par_type(int par);
+ int add_parameter();
+ int remove_parameter(int remove);
+ int change_parameter_type(int parameter);
int rename_old();
// no diff
- int change_par_name(int remove);
+ int change_parameter_name(int remove);
int x;
} var;
int Func::change_return_type() { return 0; }
-int Func::add_par() { return 0; }
-int Func::remove_par(int remove) { return remove; }
-int Func::change_par_type(int par) { return par; }
+int Func::add_parameter() { return 0; }
+int Func::remove_parameter(int remove) { return remove; }
+int Func::change_parameter_type(int parameter) { return parameter; }
int Func::rename_old() { return 0; }
-int Func::change_par_name(int remove) { return remove; }
+int Func::change_parameter_name(int remove) { return remove; }
diff --git a/test_cases/diff_tests/function/methods.1.cc b/test_cases/diff_tests/function/methods.1.cc
index 7e702ca..a50ef93 100644
--- a/test_cases/diff_tests/function/methods.1.cc
+++ b/test_cases/diff_tests/function/methods.1.cc
@@ -3,20 +3,20 @@ struct Func {
long change_return_type();
// add or remove
- int add_par(int add);
- int remove_par();
- int change_par_type(long par);
+ int add_parameter(int add);
+ int remove_parameter();
+ int change_parameter_type(long parameter);
int rename_new();
// no diff
- int change_par_name(int add);
+ int change_parameter_name(int add);
long x;
} var;
long Func::change_return_type() { return 0; }
-int Func::add_par(int add) { return add; }
-int Func::remove_par() { return 0; }
-int Func::change_par_type(long par) { return par; }
+int Func::add_parameter(int add) { return add; }
+int Func::remove_parameter() { return 0; }
+int Func::change_parameter_type(long parameter) { return parameter; }
int Func::rename_new() { return 0; }
-int Func::change_par_name(int add) { return add; }
+int Func::change_parameter_name(int add) { return add; }