summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPeter Eisentraut2023-10-26 07:16:25 +0000
committerPeter Eisentraut2023-10-26 07:20:54 +0000
commit611806cd726fc92989ac918eac48fd8d684869c7 (patch)
tree4ed4dc6fc9a1c5825bf42072e28312440484db28 /src/test
parentf0efa5aec19358e2282d4968a03db1db56f0ac3f (diff)
Add trailing commas to enum definitions
Since C99, there can be a trailing comma after the last value in an enum definition. A lot of new code has been introducing this style on the fly. Some new patches are now taking an inconsistent approach to this. Some add the last comma on the fly if they add a new last value, some are trying to preserve the existing style in each place, some are even dropping the last comma if there was one. We could nudge this all in a consistent direction if we just add the trailing commas everywhere once. I omitted a few places where there was a fixed "last" value that will always stay last. I also skipped the header files of libpq and ecpg, in case people want to use those with older compilers. There were also a small number of cases where the enum type wasn't used anywhere (but the enum values were), which ended up confusing pgindent a bit, so I left those alone. Discussion: https://www.postgresql.org/message-id/flat/386f8c45-c8ac-4681-8add-e3b0852c1620%40eisentraut.org
Diffstat (limited to 'src/test')
-rw-r--r--src/test/isolation/isolationtester.h2
-rw-r--r--src/test/modules/dummy_index_am/dummy_index_am.c2
-rw-r--r--src/test/modules/libpq_pipeline/libpq_pipeline.c2
-rw-r--r--src/test/regress/pg_regress.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/test/isolation/isolationtester.h b/src/test/isolation/isolationtester.h
index bb5c9ebece6..aae05131722 100644
--- a/src/test/isolation/isolationtester.h
+++ b/src/test/isolation/isolationtester.h
@@ -43,7 +43,7 @@ typedef enum
{
PSB_ONCE, /* force step to wait once */
PSB_OTHER_STEP, /* wait for another step to complete first */
- PSB_NUM_NOTICES /* wait for N notices from another session */
+ PSB_NUM_NOTICES, /* wait for N notices from another session */
} PermutationStepBlockerType;
typedef struct
diff --git a/src/test/modules/dummy_index_am/dummy_index_am.c b/src/test/modules/dummy_index_am/dummy_index_am.c
index c14e0abe0c6..cbdae7ab7a5 100644
--- a/src/test/modules/dummy_index_am/dummy_index_am.c
+++ b/src/test/modules/dummy_index_am/dummy_index_am.c
@@ -32,7 +32,7 @@ relopt_kind di_relopt_kind;
typedef enum DummyAmEnum
{
DUMMY_AM_ENUM_ONE,
- DUMMY_AM_ENUM_TWO
+ DUMMY_AM_ENUM_TWO,
} DummyAmEnum;
/* Dummy index options */
diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c
index ada16f1db5a..3c009ee1539 100644
--- a/src/test/modules/libpq_pipeline/libpq_pipeline.c
+++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c
@@ -639,7 +639,7 @@ enum PipelineInsertStep
BI_INSERT_ROWS,
BI_COMMIT_TX,
BI_SYNC,
- BI_DONE
+ BI_DONE,
};
static void
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index b35e87295e3..a9b8246cb71 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -91,7 +91,7 @@ typedef enum TAPtype
NOTE_END,
TEST_STATUS,
PLAN,
- NONE
+ NONE,
} TAPtype;
/* options settable from command line */