Thread: Unit testing framework for (and written in) plain C

  1. #1
    Registered User zub's Avatar
    Join Date
    May 2014
    Location
    Russia
    Posts
    104

    Unit testing framework for (and written in) plain C

    What framework do you use and why? Thanks. I using TinyCC on Windows.

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    What "tinycc" are you talking about? The only one I know is a compiler.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  3. #3
    Registered User zub's Avatar
    Join Date
    May 2014
    Location
    Russia
    Posts
    104
    Quote Originally Posted by phantomotap View Post
    O_o

    What "tinycc" are you talking about? The only one I know is a compiler.

    Soma

    That's what I meant. I using TinyCC on Windows. And I need simple (ideal: one-header) framework, that useful with my toolset (win+tcc).

  4. #4
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    Oh, that makes much more sense. I thought you were giving the framework you use.

    [Edit]
    I don't use a C testing framework because I don't write enough C code.
    [/Edit]

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Starting from this list List of unit testing frameworks - Wikipedia, the free encyclopedia

    One that might match your needs is this one https://github.com/imb/fctx
    I know nothing about it.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  6. #6
    Registered User zub's Avatar
    Join Date
    May 2014
    Location
    Russia
    Posts
    104
    Quote Originally Posted by stahta01 View Post
    I did not ask what frameworks are found in nature.

    One that might match your needs is this one https://github.com/imb/fctx
    I tried it, and its ideology is highly compatible with my style of writing programms. Unfortunately, it works with some bugs in my environment. I had the idea to make my own framework as a simplified subset of FCTX.

    I know nothing about it.
    Primarily I'm interested in your personal experience, not idle speculation.

  7. #7
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    You have now been added to my ignore list because you post questions without all the needed info in them.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  8. #8
    Registered User zub's Avatar
    Join Date
    May 2014
    Location
    Russia
    Posts
    104
    Lolwut? I asked the question "what framework do you use?"
    Then you gave the answer to another question, which I have not asked: "
    What frameworks are found in the wild?" or "Name of any framework?"
    And when I pointed out that I asked another question, you said that my question is incorrect because does not match your answers.
    My question: how much is 2 * 2? Your answer: boots.
    Of course, I'm an idiot, because I had to ask "what is worn on the feet?" Question "how much is 2 * 2?" is senseless, because you are not mathematician, but cobbler. OK. All right.
    Well, just don't worry. Will not go away, stay at home, I now call on the Nobel Committee. Don't worry, you don't need a costume. Now another fashion for Nobel Laureates: shirts with long sleeves.
    Last edited by zub; 05-25-2014 at 10:29 AM.

  9. #9
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    Actually, the question "How much is 2 * 2?" has a definitive answer. You really asked "What are some number you like to multiply?".

    The answer given was "I don't like to multiply any particular numbers, but here is a list of number you might like to multiply."

    I would have given the same answer after considering the information you added later related to having tried some only to find bugs.

    I would have only phrased things a little different: try a bunch and see which you want to use.

    I would have given a little lenience on not posting that extra information, but your attitude buys you an entry on my ignore list.

    Instead of a Nobel prize, I will take my consideration in the form peanut butter cookies.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  10. #10
    Registered User zub's Avatar
    Join Date
    May 2014
    Location
    Russia
    Posts
    104
    Actually, the question "How much is 2 * 2?" has a definitive answer.
    My question has a definitive answer too. What framework do you use? What color is your hair? Where did you learn? Do you like to wear lingerie? All these questions are clear, unambiguous and suggest an answer consisting of a single word: FCTX, green, MIT, yes.

    What additional information is needed to answer these questions? The length of my penis?

    What additional information can be represented as a response? Link to Wikipedia, which explains what the frequency of light we perceive? Or "I do not take any because blind"? And why do I need this information? May be, he begs?
    Last edited by zub; 05-26-2014 at 12:07 AM.

  11. #11
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Quote Originally Posted by zub View Post
    And I need simple (ideal: one-header) framework, that useful with my toolset (win+tcc).

    Quote Originally Posted by stahta01 View Post
    One that might match your needs is this one https://github.com/imb/fctx
    Quote Originally Posted by zub View Post
    And why do I need this information? May be, he begs?
    Un_shorten.

  12. #12
    Registered User zub's Avatar
    Join Date
    May 2014
    Location
    Russia
    Posts
    104
    Do not you realize how pathetic your attempt? If not, you fool. If yes, you bastard.

    Strongly recommend that you read a book on elementary logic, polemical techniques and cognitive distortions. For beginning - Amazon.com: Primarily Logic, Grades 2-4 (9781593631222): Judy Leimbach, Diane Draze, Dean Crawford, Pat Crawford: Books

    However, I doubt that this will help you. Teach is much easier than to retrain.The 10-yearboy, that is only read and write, you can teach physics. It is difficult, but possible. But you can't explain the structure of the world to twenty years Mormon, who read only the Bible. His brains are irreversibly damaged. Any attempt to explain to him something logically crashed because it has no logical thinking. A vicious circle.

  13. #13
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    I am but an ant trying to understand the mountain. Take pity. :P.

  14. #14
    Registered User
    Join Date
    Feb 2014
    Posts
    13
    I am suggesting to use "cunit" for performing unit test in c.
    For more details, please refer CUnit Home

  15. #15
    Registered User zub's Avatar
    Join Date
    May 2014
    Location
    Russia
    Posts
    104
    Thanks! Anybody else want to comment on the merits?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C and C++ unit testing framework
    By Siddu_Kyocera in forum C Programming
    Replies: 1
    Last Post: 05-21-2010, 08:34 AM
  2. what can not be tested in C++ unit testing?
    By Alexpo in forum C++ Programming
    Replies: 1
    Last Post: 03-01-2010, 12:31 AM
  3. Replies: 3
    Last Post: 05-11-2009, 04:50 AM
  4. A Question About Unit Testing
    By Tonto in forum C++ Programming
    Replies: 2
    Last Post: 12-14-2006, 08:22 PM
  5. Unit testing tools for .NET ?
    By gicio in forum C# Programming
    Replies: 0
    Last Post: 11-10-2003, 04:43 AM

Tags for this Thread