Hi, I'm new to junit. I want to create test cases for if condition,loops. do we have any guidelines to write test cases for if conditions.Can any1 explain with an example. Thanks in advance. Lavanya

Member Avatar
Member Avatar
+0 forum 2

[B]Search for your answer first![/B] If you're having a problem, chances are good that someone else has had the same problem. Please search the forum for existing answers before starting a new thread. Nothing is more irritating to a long time member than to answer the same question for the umpteenth time because someone didn't use the forum's search feature. [B]Don't resurrect old threads![/B] Inevitably, if you use the search feature you'll stumble upon an interesting thread that you think you can add to. Resist the temptation to post until you've looked at the post date for the most recent …

Member Avatar
Member Avatar
+6 forum 2

[I]Let's participate in writing. For my graduation project I had to do a literature study. I discussed the book "Clean Code", written by Rober C. Martin (a.k.a. "Uncle Bob"). I copy-pasted this and hope I didn't forget to adjust the formatting.[/I] [B]Motivation[/B] My literature study started when I inspected the existing code. It was almost unreadable. Their product was worked on by many programmers. Not only the people who work there now, but also those who left the past few years. A senior programmer told me many employers switched companies and all did their part in their own way. There …

Member Avatar
Member Avatar
+1 forum 15

so there's an argument about best practice for #include statements. many people put all the relevant #include <header.h> statements at the top of the .c source code. some people prefer to put the relevant #include statements within the .h header file that is associated with the .c source code consider: [U][B]Example 1[/B][/U] [B]"source.c"[/B] [CODE] #include <library1.h> #include <library2.h> #include <library3.h> #include "another.h" #include "etc.h" #include "source.h" int main(void) { //etc... [/CODE] [B]"source.h"[/B] [CODE] #ifndef _SOURCE_H #define _SOURCE_H #define RELEVANT_MACRO_IN_SOURCE_C //etc... #endif [/CODE] [U][B]Example 2[/B][/U] [B]"source.c"[/B] [CODE] #include "source.h" int main(void) { //etc... [/CODE] [B]"source.h"[/B] [CODE] #ifndef _SOURCE_H #define _SOURCE_H #include …

Member Avatar
Member Avatar
+0 forum 11

Hello, if I start to distribute some software I have written under a copyright, using a free software license, I would like to know what do the dates of the copyright stand for. If I say (c) 2009-2010 Vernon Swanepoel, what does it mean that I did on those dates. The reason I am asking is can I do something like this (written in Python) [CODE]def copyrightText(): from time import localtime if localtime()[0] == 2009: crD = "2009" else: crD = "2009 - %d" % localtime()[0] return crD[/CODE] So that each year, the material's copyright simply updates itself. Is there …

Member Avatar
Member Avatar
+0 forum 1

The End.