On Tue, 2015-03-10 at 18:42 +0000, Charles Kerr wrote:
> > + -DSCHEMA_DIR="\"$(abs_builddir)/gsettings-schemas-compiled/\"" \
>
> Might make sense to define this directory as its own variable, so that it can be used below in schemas-compiled.stamp?
>
> Also, we're using $(abs_builddir)/gsettings-schema-compiled here but $(builddir)/gsettings-schema-compiled below... I think they're the same in this MP but it's probably better to use abs_builddir everywhere?
Makes sense. r460
> > $(top_builddir)/common/indicator-messages-service.h \
> > $(top_srcdir)/src/gactionmuxer.c \
> > - $(top_srcdir)/src/gactionmuxer.h
> > + $(top_srcdir)/src/gactionmuxer.h \
>
> How did this work before?
>
> > $(top_srcdir)/src/dbus-data.h
I think because it was header files and you don't *actually* need to
include them in the source list unless you are doing a make dist to
build your tarball. If you always use the Bazaar branch you'll never
notice them being missing.
I was trying to make the tests read nicely in that otherwise you end up
having to do all the GObject casts. The reality is that this one isn't
too useful, but the DbusTestTask gets passed to libdbustest all the
time. Not as much with this fixture, but in the other i-sound tests it
is used like that more (mock comes from i-sound)
You just want me to give into your auto everywhere world! r462
> > + EXPECT_EVENTUALLY_ACTION_ENABLED("remove-all", false);
> > +}
>
> EXPECT_ is used as the default in these tests, but most of the time followup tests don't make sense if the ones that preceded them failed & should use ASSERT_ instead
So, yes. But I felt really stupid making an "ASSERT_EVENTUALLY" macro,
it seems like you either assert or your wait for things, not both. I
think we should bike shed this at the sprint and figure out what we want
here. I get your point but I'm not sure if we're diluting things too
much by going down that path.
On Tue, 2015-03-10 at 18:42 +0000, Charles Kerr wrote:
> > + -DSCHEMA_ DIR="\" $(abs_builddir) /gsettings- schemas- compiled/ \"" \ compiled. stamp? /gsettings- schema- compiled here but $(builddir) /gsettings- schema- compiled below... I think they're the same in this MP but it's probably better to use abs_builddir everywhere?
>
> Might make sense to define this directory as its own variable, so that it can be used below in schemas-
>
> Also, we're using $(abs_builddir)
Makes sense. r460
> > $(top_builddir) /common/ indicator- messages- service. h \ /src/gactionmux er.c \ /src/gactionmux er.h /src/gactionmux er.h \ /src/dbus- data.h
> > $(top_srcdir)
> > - $(top_srcdir)
> > + $(top_srcdir)
>
> How did this work before?
>
> > $(top_srcdir)
I think because it was header files and you don't *actually* need to
include them in the source list unless you are doing a make dist to
build your tarball. If you always use the Bazaar branch you'll never
notice them being missing.
> > + operator DbusTestDbusMock* () {
> > + return mock;
> > + }
>
> overloading operator() like this seems excessive.
I was trying to make the tests read nicely in that otherwise you end up
having to do all the GObject casts. The reality is that this one isn't
too useful, but the DbusTestTask gets passed to libdbustest all the
time. Not as much with this fixture, but in the other i-sound tests it
is used like that more (mock comes from i-sound)
> > + std::shared_ ptr<GMenuModel> _menu; ptr<GActionGrou p> _actions; stackoverflow. com/questions/ 228783/ what-are- the-rules- about-using- an-underscore- in-a-c- identifier
> > + std::shared_
> > + DbusTestService * _session_service;
> > + DbusTestService * _system_service;
> > + DbusTestTask * _test_indicator;
> > + DbusTestTask * _test_dummy;
> > + GDBusConnection * _session;
> > + GDBusConnection * _system;
> > +
>
> http://
Eh, sure, one underscore seems like it doesn't break the rules. Not
perfect for sure.
> > + std::for_ each(mocks. begin() , mocks.end(), [this]( std::shared_ ptr<DbusTestTas k> task) { task_get_ bus(task. get()) == DBUS_TEST_ SERVICE_ BUS_SYSTEM) { service_ add_task( _system_ service, task.get()); service_ add_task( _session_ service, task.get());
>
> "for (auto task : mocks) {" would be clearer
>
> > + if (dbus_test_
> > + dbus_test_
> > + } else {
> > + dbus_test_
> > + }
> > + });
Good point. r461
> > + virtual ~PerRunData (void) {
>
> dtor doesn't need a void argument?
The compiler at least seems to want the parameter list. The void is just
making it look less like line noise :-)
> > +static void tivate (GObject * obj, gchar * name, GVariant * value, gpointer user_data) { cast<std: :string *>(user_data); get_string( value, nullptr);
> > +messageReplyAc
> > + std::string * res = reinterpret_
>
> "auto res =" would avoid redundancy
>
> > + *res = g_variant_
> > +}
You just want me to give into your auto everywhere world! r462
> > + EXPECT_ EVENTUALLY_ ACTION_ ENABLED( "remove- all", false);
> > +}
>
> EXPECT_ is used as the default in these tests, but most of the time followup tests don't make sense if the ones that preceded them failed & should use ASSERT_ instead
So, yes. But I felt really stupid making an "ASSERT_EVENTUALLY" macro,
it seems like you either assert or your wait for things, not both. I
think we should bike shed this at the sprint and figure out what we want
here. I get your point but I'm not sure if we're diluting things too
much by going down that path.