Git Product home page Git Product logo

h2unit's People

Contributors

lingjf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

h2unit's Issues

Merge h2unit.cpp into single h2unit.h file

Currently end-user should include two files: h2unit.cpp and h2unit.h.
If there two files can be merged into one file , it will be more simple to use.

C++ class can be wrote in header file, static member method and static variable can be used to implement global instance. I have wrote a test, it works.

The difficult is how to implement memory leak detection for C source file.
A work around is that consider C source file as C++ source file and compile with C++ compiler.

Can't dynamic stub functions by name in MAC OS

It success to dynamic stub by function pointer, but it fail to dynamic stub by function name. It can be reproduced in unit test environment.

H2CASE(dynamic_stub, "test dynamic stub local static function")

Analysis:
mprotect() failed because the address which is generated by 'nm' with the function name.
nm's output symbol address is incorrect (comparing with function pointer).

Can't take over assert() macro

A normal idea to replace assert() is undefine assert first, then define assert to new function. Include assert.h (cassert) before re-define assert.
But in actual, assert.h does not following #ifndef/#define/#endif mode , so the normal idea does not work.
More information refer to /user/include/assert.h

Compile failed under 64bit system

compile error message:

h2unit.cpp: In member function ‘void h2unit_case::stub(void_, void_, const char*)’:
h2unit.cpp:918: error: ‘p’ was not declared in this scope

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.