Skip to content

Request for advice about how to verify a function like int main(int argc, char *argv[]) #6973

@eleehiga

Description

@eleehiga

Currently I am trying to verify this function:

#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

int main(int argc, char* argv[])
{       
        int i = 0;
        if(argc == 1)
                i = argv[1];
        assert(i == 1);
}  

However, I am unsure how to test this with inputting parameters for main. Therefore was wondering how I can verify this function with inputting the parameters for main?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions