-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy python tests for Modulemd.ModuleIndexMerger.merger into C #425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a very good effort. Your CI is failing though. Please run ninja test
before committing your changes. That will format the code. Then amend the patch over here.
@@ -20,6 +21,7 @@ | |||
#include "modulemd-module-index.h" | |||
#include "private/test-utils.h" | |||
|
|||
typedef int gint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also use guint64
and not use this at all. This is all defined in glib
already.
* sorting issues. | ||
*/ | ||
merger = modulemd_module_index_merger_new (); | ||
random_low = rand()%100+1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look at this on how to use random
with GLib
. https://developer.gnome.org/glib/stable/glib-Random-Numbers.html
Declare your variable datatypes accordingly.
@@ -12,6 +12,7 @@ | |||
*/ | |||
|
|||
#include <glib.h> | |||
#include <stdlib.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming you added this for rand
. This can be eliminated by using the functionality in glib
I have run |
Please see the log from the failing CI. You have a bunch of warnings because of incompatible data types. Either typecast your parameters or use functions from the Also, you must run |
I have typecast all the parameters and eliminate all the warnings. But the CI test seems failing while I run |
The CI test passed after I use clang-format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Copy python tests for Modulemd.ModuleIndexMerger.merger into C Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
For issue #198