[zeromq-dev] How to use a src/ new class belonging to a new file, inside a tests/ new test in libzmq ?

Pieter Hintjens ph at imatix.com
Thu Sep 19 18:07:46 CEST 2013


The test programs cannot access internal libzmq classes, only what's
exported via the API, which is in zmq.h and zmq_utils.h.

On Thu, Sep 19, 2013 at 5:42 PM, Laurent Alebarde <l.alebarde at free.fr> wrote:
> Hi libzmq developpers,
>
> I am doing some experiments, and I don't manage to figure out how to add
> tests in tests/ that use some class added in a new file in src/
> I did add my files in the Makefile.am respectively in src/ and tests/
>
> I obtain "was not declared in this scope" from the compiler.
>
> In my research, I could see that all classes used in tests seems to be
> (hypothesis: class or struct name build with a "_t" suffix)  zmq_pollitem_t
> and zmq_event_t both defined in include/zmq.h
>
> FYI, searched by : find tests/  -regex ".*\.[ch]p*" -exec grep "_t " '{}'
> ';' | grep -v "zmq_msg_t" | grep -v size_t | grep -v uint32_t | grep -v
> uint8_t
> and for each (e.g. zmq_pollitem_t) : find .  -regex ".*\.[ch]p*" -exec grep
> -l "zmq_pollitem_t" '{}' ';'
>
> So, shall I add my class there too ? What is the "good" way to do it please
> ?
>
> Cheers,
>
>
> Laurent.
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list