Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 16 19:51
    stef commented #221
  • Sep 04 21:11
    yesudeep opened #359
  • Aug 22 13:29
    paul000001 commented #358
  • Aug 15 06:37
    Snaipe closed #349
  • Aug 15 06:37
    Snaipe commented #349
  • Aug 15 06:28
    Snaipe commented #358
  • Aug 13 23:43
    paul000001 commented #358
  • Aug 13 23:43
    paul000001 commented #358
  • Aug 13 20:35
    Snaipe commented #358
  • Aug 13 20:35
    Snaipe commented #358
  • Aug 13 19:46
    paul000001 opened #358
  • Aug 06 20:24
    chuckfossen commented #222
  • Jul 22 19:46
    apthorpe commented #234
  • Jun 30 17:02
    LeandreBl commented #351
  • Jun 30 17:02
    LeandreBl commented #351
  • Jun 30 10:13
    Snaipe commented #351
  • Jun 18 10:13
    abkarcher closed #354
  • Jun 18 10:13
    abkarcher commented #354
  • Jun 18 10:03
    daveabiy opened #357
  • Jun 18 09:57
    Snaipe commented #354
Masayuki Nagamachi
@masnagam
Yes, that's right.
Two dependencies folders are created.
First one is created in the root source directory by CMake and doesn't contains source files of submodules.
The other is created in vendor/criterion by git-submodule command and contains source files of submodules.
I'll send a pull request soon.
Thank you for your reply.
Franklin Mathieu
@Snaipe
2.3.0-rc2 is out. As always, feedback appreciated before we hit the release.
Kasper Sacharias Roos Eenberg
@kse
Hmm. Building criterion from our fails, in fact I cannot build from source with versions 2.2.{1,2}.
I get the error:
/tmp/yaourt-tmp-kse/aur-criterion/src/criterion/src/io/output.c:3:19: fatal error: khash.h: No such file or directory
 #include <khash.h>
Building v2.3.0-rc2 works.
Franklin Mathieu
@Snaipe
@kse v2.3.0-rc2 is stable on linux, so I'm going to update the package to that version
thanks for the report!
Kasper Sacharias Roos Eenberg
@kse
You are very welcome, it's a lovely library, so thank you.
Franklin Mathieu
@Snaipe
2.3.0 is finally out! The full announcement can be found here.
Douman
@DoumanAsh
@Snaipe How is going mimick?
Franklin Mathieu
@Snaipe
Not much done due to school projects, but I'm going back to it soon-ish
I think there are issues with PIE builds, but it should still be functional otherwise
Douman
@DoumanAsh
Where is from symbol libintl_dgettext, trying to build from sources right now on my msys setup but i'm failing for now :(
Douman
@DoumanAsh
Is it ok that binaries from release 2.3 have version: v2.3.0-rc2
Douman
@DoumanAsh
And it seems like 2.2. binaries for mingw-x64 are actually 32bit...
Franklin Mathieu
@Snaipe
@DoumanAsh That's mostly what the re-release was for
as for i18n, it gets detected on msys even though the support is, well, untested, so I'd advise you pass -DI18N=OFF to cmake
Douman
@DoumanAsh
Actually i made 2.3 binaries to work. Originally it is just crashed, but now it is ok, so no need for 2.2 :)
Douman
@DoumanAsh
@Snaipe Q about mimick. How exactly works mmk_when()? I don't get why CallExpr isn't chaning anything for me :(
Franklin Mathieu
@Snaipe
@DoumanAsh mmk_when takes an expression that must call your mocked function with the parameter (or matchers) you want
e.g. if you're mocking malloc, and want to describe the behaviour of the mock when called with 4, you'd do mmk_when(malloc(4), ...)
(do mind that for some standard functions like malloc or memset the CallExpr can be optimized away because the compiler thinks that it has no side effects)
Douman
@DoumanAsh
@Snaipe it is just after i made test i tried to change expression, but it seems it works as usual... even though test itself works as usual. For example i tried to mmk_when(GetClipboardData(mmk_eq(UINT, format))) - format is variable. Test works, then i tried to change it like format + 1 it works too. But when i use mmk_verify(GetClipboardData(mmk_eq(UINT, format + 1)) it finds error
Franklin Mathieu
@Snaipe
do you perhaps have a self contained example with the expected vs actual result?
Douman
@DoumanAsh
Not right now, i'll push my code and will link it
Douman
@DoumanAsh
Here is repo https://github.com/DoumanAsh/lazy-winapi.c - It relies on WinAPI so it works only on windows... Do you use Windows? If not maybe i could try to make some more simple example. You can build it with Cmake UNIT_TESTING option and then build unit tests with make. In result there should be ut.exe, but these tests are stable only with -j1 :(
If i try to change mmk_eq(UINT, format) over https://github.com/DoumanAsh/lazy-winapi.c/blob/master/test/clipboard_mock.c#L38 with a different value of format, test will pass. But if i do the same over line https://github.com/DoumanAsh/lazy-winapi.c/blob/master/test/clipboard_mock.c#L42 then it fails
Not sure if i got it right though
Franklin Mathieu
@Snaipe
If you're changing the parameter in mmk_verify to format + 1, you also need to make sure that GetClipboardData gets passed format + 1
in essence mmk_verify, well, verifies that GetClipboardData gets called with the right parameters, so you'd need to change format to format + 1 on lines 38, 40, and 42
(in clipboard_mock.c)
Douman
@DoumanAsh
But what will happen if i wouldn't pass it to GetCLipboardData? As of now test works ok
also i changed mmk_when, not mmk_verify
I assumed if i would change mmk_when then mmk_verify would fail, but it works
Franklin Mathieu
@Snaipe
both are actually independent
mmk_when specifies what happens at runtime when the function gets called
mmk_verify checks whether the function was called the way you wanted
they can work together or independently
Douman
@DoumanAsh
hm... but i don't exactly get mmk_when then.. i expected that it would invoke mock only when i pass format +1 to mock, but it gets invoked anyway
is there any purpose in specifying condition?
Franklin Mathieu
@Snaipe
by condition do you mean mmk_eq(UINT, format)rather than just format?
however mmk_eq is only relevant when you use other matchers
Douman
@DoumanAsh
yes, i meant mmk_eq(UINT, format) and by format + 1 i meant mmk_eq(UINT, format + 1)
Franklin Mathieu
@Snaipe
if so, yes, there is in fact no difference in this case between the two syntaxes
Douman
@DoumanAsh
and i'm confused because it makes no difference to my mock having either mmk_eq(UINT, format) or mmk_eq(UINT, format + 1)
Franklin Mathieu
@Snaipe
for instance mmk_when(func(1, mmk_le(int, 2)), .then_return = 0) is illegal because you can't mix matchers and non-matchers, so you need to use mmk_eq(int, 1) in this case
and in your case, it doesn't make any difference because by default the mock returns a zero-ish value for unspecified parameters
so, in your case, it always returns NULL
Douman
@DoumanAsh
aha... so that's why
Franklin Mathieu
@Snaipe
if you need it to return a valid clipboard HANDLE for certain values, I would probably call GetClipboardData before creating the mock, and do something like mmk_when(GetClipboardData(42), .then_return = the_handle)