[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How do you choose to write your unit tests in C, /g/? You do

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 45
Thread images: 6

File: hqdefault.jpg (17KB, 480x360px) Image search: [Google]
hqdefault.jpg
17KB, 480x360px
How do you choose to write your unit tests in C, /g/?

You do write unit tests for your C code, right?
>>
>>58585087
I don't even write unit tests for my Java code.
>>
What is a unit test?
>>
>>58585087
POO IN THE LOO
>>
File: 1483803182775.jpg (118KB, 1280x720px) Image search: [Google]
1483803182775.jpg
118KB, 1280x720px
>unit tests
>>
File: 1452403462016.png (79KB, 307x400px) Image search: [Google]
1452403462016.png
79KB, 307x400px
>>58585087
>Actually writing unit tests
>Not formally proving your program to be correct
>>
>>58585213
This to be honest family.
>>
>>58585213
Well-designed unit tests could help catch bugs in the implementation of third-party libraries, the OS, and even the hardware.
When you formally prove your program, you do it under the assumption that all those things work absolutely correct.
>>
>>58585305
>bugs in the implementation of third-party libraries, the OS, and even the hardware
Literally not my problem, take it to upstream.
>>
>>58585335
How can I take a bug that I don't even know about yet upstream?
>>
>>58585356
I don't know, ask upstream.
>>
>>58585439
Faggot
>>
>>58585087
I don't.
>>
>>58585087
I wouldn't write code in an unsafe language in the first place.
>>
>>58585213
this guy is on dr. leslie lamport level, aka LLL
>>
>>58585087
unit tests are harder to write than the actual code, fuck that
>>
File: image001.jpg (124KB, 480x320px) Image search: [Google]
image001.jpg
124KB, 480x320px
>>58586851
So you rather tediously test your app manually and thoroughly with every change you make to the code?
>>
>>58585948
Tell upstream to do their job correctly.
Tracking bug in other programs shouldn't be my job
>>
You don't need unit tests as long as you have a public issue tracker.
>>
>>58587279
And you just release your code without testing if it even works because you rely on other people to do the work for you?
>>
File: 1483039441718.jpg (612KB, 667x1000px) Image search: [Google]
1483039441718.jpg
612KB, 667x1000px
>>58585087
Sorry but I am too retarded for writing unit tests.

>tfw not even kidding
>>
how can I unit test avr-code?
>>
>>58585087
I don't
>>
>>58586851
just start with smoke tests and add a new unit test for every issue/bug thats reported and solved.

>>58589352
like every other code, except that you need to add some wires
>>
>>58589527
>like every other code, except that you need to add some wires

Wires? What?
>>
> his code coverage isn't 100%
lolwat, are you an idiot?
>>
>>58585087
I write it in Ada instead
>>
>>58590125
assuming that you want to test routines that get external input on ports or output something (e.g. your uart handler, input from sensors, etc)
>>
>>58585145
>he doesn't even know who pic related is
>>>/out/ the door you go
>>
people on /g/ are retards who think they are so fucking cool because they can write their useless fizzbuzz and counting-down-from-700-to-200-in-steps-of-13-bullshit in max perofrmant C

they hate actual useful shit like object oriented programming and unit testing
>>
File: 1473904174293.jpg (47KB, 600x373px) Image search: [Google]
1473904174293.jpg
47KB, 600x373px
>>58585087
Sometimes.
>>
I test my own input. I don't assume 50 people will all be using the same program on the same machine at the same time.

For games, you can squeeze the performance out of a single place in the draw if more people are going to use it and have all those people play from different places in the machine at the ideal setting be no local collision means at worst you lose individual players.
>>
>>58585087
Yes.

https://github.com/Tuplanolla/cheat
>>
>>58590612
Looks dead.
>>
There's absolutely no excuse not to write unit tests.
>>
>>58590468
>implying that is even hard to do

OOP "programmers" everyone
>>
>>58590870
>>implying that is even hard to do

that wasn't written anywhere
learn to read, nigger
>>
>>58590855
Way to shift attention away from C and onto what you describe in your authority.

I can't stand python and women.
>>
>>58590897
the way you typed it implied you thought it was hard and it was backed up with liking OOPs
>>
I only use C for microcontroller programming and i only did manual testing so far but you might want to take a look at CUnit
>>
>>58590921
What the fuck are you talking about
>>
>>58590935
i didn't imply anything
you just chose to get offended
>>
>>58590870
>neet lacking reading comprehension
>>
>>58590701
Looks complete.
>>
>>58591299
Abandoned 2 years ago
Thread posts: 45
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.