Message ID | 1353515085-8053-6-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On Thu, Nov 22, 2012 at 12:24 AM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > We should be using the strongly typed fwts_framework_flags rather > than just an int. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/include/fwts_framework.h | 4 ++-- > src/lib/src/fwts_framework.c | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h > index 0d9e2aa..2f84693 100644 > --- a/src/lib/include/fwts_framework.h > +++ b/src/lib/include/fwts_framework.h > @@ -159,13 +159,13 @@ typedef struct fwts_framework_test { > const char *name; > fwts_framework_ops *ops; > int priority; > - int flags; > + fwts_framework_flags flags; > fwts_results results; /* Per test results */ > bool was_run; > } fwts_framework_test; > > int fwts_framework_args(const int argc, char **argv); > -void fwts_framework_test_add(const char *name, fwts_framework_ops *ops, const int priority, const int flags); > +void fwts_framework_test_add(const char *name, fwts_framework_ops *ops, const int priority, const fwts_framework_flags flags); > int fwts_framework_compare_test_name(void *, void *); > void fwts_framework_show_version(FILE *fp, const char *name); > > diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c > index c940305..d688edf 100644 > --- a/src/lib/src/fwts_framework.c > +++ b/src/lib/src/fwts_framework.c > @@ -120,7 +120,7 @@ static int fwts_framework_compare_priority(void *data1, void *data2) > void fwts_framework_test_add(const char *name, > fwts_framework_ops *ops, > const int priority, > - const int flags) > + const fwts_framework_flags flags) > { > fwts_framework_test *new_test; > > @@ -221,8 +221,8 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full) > int total = 0; > > typedef struct { > - const char *title; /* Test category */ > - const int flag; /* Mask of category */ > + const char *title; /* Test category */ > + fwts_framework_flags flag; /* Mask of category */ > } fwts_categories; > > static fwts_categories categories[] = { > -- > 1.7.10.4 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 11/22/2012 12:24 AM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > We should be using the strongly typed fwts_framework_flags rather > than just an int. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/include/fwts_framework.h | 4 ++-- > src/lib/src/fwts_framework.c | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h > index 0d9e2aa..2f84693 100644 > --- a/src/lib/include/fwts_framework.h > +++ b/src/lib/include/fwts_framework.h > @@ -159,13 +159,13 @@ typedef struct fwts_framework_test { > const char *name; > fwts_framework_ops *ops; > int priority; > - int flags; > + fwts_framework_flags flags; > fwts_results results; /* Per test results */ > bool was_run; > } fwts_framework_test; > > int fwts_framework_args(const int argc, char **argv); > -void fwts_framework_test_add(const char *name, fwts_framework_ops *ops, const int priority, const int flags); > +void fwts_framework_test_add(const char *name, fwts_framework_ops *ops, const int priority, const fwts_framework_flags flags); > int fwts_framework_compare_test_name(void *, void *); > void fwts_framework_show_version(FILE *fp, const char *name); > > diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c > index c940305..d688edf 100644 > --- a/src/lib/src/fwts_framework.c > +++ b/src/lib/src/fwts_framework.c > @@ -120,7 +120,7 @@ static int fwts_framework_compare_priority(void *data1, void *data2) > void fwts_framework_test_add(const char *name, > fwts_framework_ops *ops, > const int priority, > - const int flags) > + const fwts_framework_flags flags) > { > fwts_framework_test *new_test; > > @@ -221,8 +221,8 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full) > int total = 0; > > typedef struct { > - const char *title; /* Test category */ > - const int flag; /* Mask of category */ > + const char *title; /* Test category */ > + fwts_framework_flags flag; /* Mask of category */ > } fwts_categories; > > static fwts_categories categories[] = { > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h index 0d9e2aa..2f84693 100644 --- a/src/lib/include/fwts_framework.h +++ b/src/lib/include/fwts_framework.h @@ -159,13 +159,13 @@ typedef struct fwts_framework_test { const char *name; fwts_framework_ops *ops; int priority; - int flags; + fwts_framework_flags flags; fwts_results results; /* Per test results */ bool was_run; } fwts_framework_test; int fwts_framework_args(const int argc, char **argv); -void fwts_framework_test_add(const char *name, fwts_framework_ops *ops, const int priority, const int flags); +void fwts_framework_test_add(const char *name, fwts_framework_ops *ops, const int priority, const fwts_framework_flags flags); int fwts_framework_compare_test_name(void *, void *); void fwts_framework_show_version(FILE *fp, const char *name); diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c index c940305..d688edf 100644 --- a/src/lib/src/fwts_framework.c +++ b/src/lib/src/fwts_framework.c @@ -120,7 +120,7 @@ static int fwts_framework_compare_priority(void *data1, void *data2) void fwts_framework_test_add(const char *name, fwts_framework_ops *ops, const int priority, - const int flags) + const fwts_framework_flags flags) { fwts_framework_test *new_test; @@ -221,8 +221,8 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full) int total = 0; typedef struct { - const char *title; /* Test category */ - const int flag; /* Mask of category */ + const char *title; /* Test category */ + fwts_framework_flags flag; /* Mask of category */ } fwts_categories; static fwts_categories categories[] = {