Giter Site home page Giter Site logo

cspec's People

Contributors

arnaudbrejeon avatar asura avatar toshi-kawanishi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cspec's Issues

Missing symbols (unclear how to build and install)

The Readme is very lacking in the specifics of how to get started with building cspec. Here's what I tried:

$ ./autogen.sh
$ ./configure # also attempted with --prefix=/usr
$ make
$ sudo make install

In my project that I'll be testing, I created a test.c file as described in your README, with code copied from examples/sample/main.c:

#include <stdio.h>
#include <string.h>
#include <cspec.h>
#include <cspec_output_header.h>
#include <cspec_output_verbose.h>
#include <cspec_output_unit.h>

DESCRIBE(strcmp, "int strcmp ( const char * str1, const char * str2 )")

  IT( "returns 0 only when strings are equal" )
    SHOULD_EQUAL( strcmp("hello", "hello"), 0)
    SHOULD_NOT_BE_NULL( strcmp("hello", "world") )
  END_IT

  IT( "returns a negative integer when str1 is less than str2"  )
    SHOULD_BE_TRUE( strcmp("hello", "world") < 0 )
    SHOULD_BE_TRUE( strcmp("0123", "1321431") < 0 )
  END_IT

  IT( "returns a positive integer if str1 is greater than str2"  )
    SHOULD_BE_TRUE( strcmp("yellow", "world") > 0 )
    SHOULD_BE_TRUE( strcmp("9", "789") > 0 )
  END_IT

END_DESCRIBE

int main() {
  CSpec_Run( DESCRIPTION( strcmp ), CSpec_NewOutputHeader() );
  return 0;
}

Building test.c with gcc -o test test.c yields the following errors:

test.o: In function `strcmp_describe':
/vagrant/gtthreads/test.c:14: undefined reference to `CSpec_StartDescribe'
/vagrant/gtthreads/test.c:16: undefined reference to `CSpec_StartIt'
/vagrant/gtthreads/test.c:17: undefined reference to `CSpec_Eval'
/vagrant/gtthreads/test.c:18: undefined reference to `CSpec_Eval'
/vagrant/gtthreads/test.c:19: undefined reference to `CSpec_EndIt'
/vagrant/gtthreads/test.c:21: undefined reference to `CSpec_StartIt'
/vagrant/gtthreads/test.c:22: undefined reference to `CSpec_Eval'
/vagrant/gtthreads/test.c:23: undefined reference to `CSpec_Eval'
/vagrant/gtthreads/test.c:24: undefined reference to `CSpec_EndIt'
/vagrant/gtthreads/test.c:26: undefined reference to `CSpec_StartIt'
/vagrant/gtthreads/test.c:27: undefined reference to `CSpec_Eval'
/vagrant/gtthreads/test.c:28: undefined reference to `CSpec_Eval'
/vagrant/gtthreads/test.c:29: undefined reference to `CSpec_EndIt'
/vagrant/gtthreads/test.c:31: undefined reference to `CSpec_EndDescribe'
test.o: In function `main':
/vagrant/gtthreads/test.c:34: undefined reference to `CSpec_NewOutputHeader'
/vagrant/gtthreads/test.c:34: undefined reference to `CSpec_Run'
collect2: ld returned 1 exit status
make: *** [test] Error 1```

I attempted these steps on both OSX 10.9.2 and Ubuntu Linux with standard build tools installed and had the same results.

Am I installing cspec properly? Are there build flags that I am missing? Please point me in the right direction.

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.