Coder Social home page Coder Social logo

prog2tests's People

Contributors

fefrei avatar

prog2tests's Issues

Directory creation

UpdateTool should be able to create directories anew.
It would be nice if the "example" files could be copied this way.

Original issue reported on code.google.com by [email protected] on 23 Jun 2012 at 12:12

testDpllFormulaNull

    @Test
    public void testDpllFormulaNull() {
        try {
            DPLLAlgorithm algo  = new DPLLAlgorithm(null);
            fail("You should've thrown a NullPionterException!");
        } catch (Exception e) {
            assertEquals(NullPointerException.class ,e.getClass());
        }

    }

Original issue reported on code.google.com by [email protected] on 4 Jul 2012 at 8:50

Statistics report tool

I need a bit feedback on how to properly word this.
Far before we can deploy any such report tool, we need some kind of "dummy", 
that contains a warning message that is never *automatically* displayed.
If, later on, something tries to call the dummy method, a message is displayed 
once (and only once per JUnit run, don't worry), that basically says "Your test 
accesses this method, therefore your Statistics Reporter Tool is out of date".

Now, please help me to find the right words.
This is my first attempt at writing this:



You are using the initial (and therefore oldest) version of the statistics 
report tool.
You should only see this message when a test tried to Trigger the mechanisms
that will later be implemented in StatisticsReporterTool.

** Please try running "StatisticsReporterTool" as a JUnit test! **

Before making ANY connection, and before ANY attempt to read ANYTHING, we will 
ask you again
If in doubt, these programs won't make any connection or anything you might not 
have wanted.
Rest assured that it's safe to upgrade this test (by running 
StatisticsReporterTool as a JUnit Test).
With the new version, you can also turn off this message permanently.
Again, you will be asked before anything happens.

Original issue reported on code.google.com by [email protected] on 30 Jun 2012 at 8:29

Correct handling of more than 4 arguments

StackFrame handles that internally and perfectly fine.

But:

If you are not using StackFrame (either because you didn't know or you don't 
want to), then it gets tricky.
=> Test it a bit, like this:

int foo(int a, int b, int c, int d, int e) {
    return a+b+c+d+e;
}

Original issue reported on code.google.com by [email protected] on 17 Jul 2012 at 7:59

pure negative iff positive dependent is empty

Just for me to remember:

(22:20:22) bewied: Sowohl isPurePositive als auch isPureNegative ist als wahr 
definiert, wenn die Menge der NEGATIVE dependent clauses leer ist.
(22:20:43) bewied: Leider kann ich nicht mehr sauber denken: Welches von beiden 
ist nochmal der Typo?
(22:28:41) Tobias_Frey: [..] der Typo ist bei pureNegative

=> pure negative iff positive dependent is empty
=> pure positive iff negative dependent is empty

Original issue reported on code.google.com by [email protected] on 27 Jun 2012 at 1:24

Test cases designed for sat solvers?

How about some test cases specifically designed for sat solvers? I found some 
possibilities to get them, but I do not think that this increases the faith in 
the correctness of our programs. What do you think?

(More specifically, I have thought of http://fmv.jku.at/fuzzddtools/)

Original issue reported on code.google.com by [email protected] on 24 Jun 2012 at 8:08

Immutable Variables in Clause

StudentClauseImplementation.getVariables() must be immutable, and throw an 
UnsupOpEx on any attempt.
Yet to test: What does Collections.unmodifiableStuff() return? Can we use 
instanceof here? how does unmodifiableMap(foo).values() behave?

Original issue reported on code.google.com by [email protected] on 22 Jun 2012 at 10:07

behaviour of iterate for stack underruns

What should iterate() do when it has remove all stack entries? Should it return 
"true" immediately or should it return "false" and return "true" on the next 
iteration? We should ask and then build a test for that.

Original issue reported on code.google.com by [email protected] on 25 Jun 2012 at 6:54

setOperand(7654321, someNode) is Allowed

(19:10:22) bewied: Soll sich setOperand() im Falle von makeBlock() so verhalten 
wie eine ArrayList, oder ist das Hinzufügen komplett verboten?
(19:11:23) Tobias_Frey: Ich sehe nicht, wieso es verboten sein sollte?


(19:12:23) bewied: makeBlock() // Keine Argumente
(19:12:35) bewied: blockNode.setOperand(50, anotherNode);
(19:12:40) bewied: Was passiert?
(19:13:01) Tobias_Frey: Der 50. Operand wird auf anotherNode gesetzt?


(19:17:37) bewied: Was liefert dann der Aufruf von getOperand(0) bzw. 
getOperand(49) bzw getOperand(50)?
(19:18:35) Tobias_Frey: null bzw. null bzw. anotherNode
(19:18:36) bewied: Außerdem: setOperand(50, someNode) zu erlauben ist schon 
ganz schön hintertücksch.
(19:18:55) Tobias_Frey: Wieso? Man könnte das ganze ja von hinten parsen?
(19:19:02) Tobias_Frey: Und 0 bis 49 danach einfügen


(19:18:03) bewied: Was passiert bei setOperand(-42, someNode)
[...]
(19:19:21) Tobias_Frey: undefiniert für negative Werte


(19:35:52) bewied: Tobias_Frey: Aber für die Nodes, deren Operandenzahl "fix" 
ist (0 bis 3), da ist nur das Verhalten für die Wertebereiche {} bis [0;4] 
definiert, oder?
(19:43:11) Tobias_Frey: Wenn die Operandenanzahl fest ist, ist natürlich das 
Verhalten nur für die jweiligen Bereichen definiert.


(19:38:27) bewied: node.setOperand(0, null); node.getOperand(0) // MUSS, DARF 
oder DARF NICHT eine NullPointerException geworfen werden?
(19:43:16) Tobias_Frey: DARF


(19:21:03) bewied: Dürfen die Iteratoren wenigstens fail-fast sein?
(19:21:24) bewied: Moment, warte.
(19:21:40) bewied: Müssen die Iteratoren fail-fast sein? Ich hoffe nicht.
(19:44:26) bewied: MUSS, DARF oder DARF NICHT der iterator fail-fast sein?
[...]
(19:46:19) Tobias_Frey: Es ist egal; aber wenn man das ordentlich macht, sollte 
es fail-fast sein


(19:58:10) felixfreiberger: Was ist mit getOperand(int i), wenn noch nie bis 
dahin aufgefüllt wurde?
(19:58:21) felixfreiberger: null, IndexOutOfBoundException?
<noch keine Antwort>

Original issue reported on code.google.com by [email protected] on 15 Jul 2012 at 6:12

test for corner cases

Hi, I have written a haskell script to automatically generate lots tests for 
isSatisfiable() for corner cases. That is, all that consist of two binary 
operants. All possible relations between varaibles, as well as all combinations 
with negations have been established. There are 152 726 test cases in total.

I first had the idea of outputting all of them into a .java file, but java 
cannot handle that. For 500 test cases, it works, though. I'll include the 
script and the output of 500 test cases with this message.

If someone feels like including the test here, feel free to contact me.

For know, I suppose writing everything in some data file and reading it from a 
testcase is the best idea. I can generate any format you'd like with haskell, 
but I can't write a testcase in java to read stuff in.

Btw, why are we posting in English?

Original issue reported on code.google.com by [email protected] on 24 Jun 2012 at 7:53

Attachments:

Tsetin-Renumbering

Check whether the code is corectly numbering the subnodes.
Tell the user NOT to renumber the nodes.
This should help in becoming more verbose -- I think we should say WHAT is 
wrong, if that's possible at all.

Original issue reported on code.google.com by [email protected] on 22 Jun 2012 at 6:39

'testStandardSatisfiable' kollidiert mit Spezifikation?

Hallo.

Der Test 'testStandardSatisfiable' kollidiert meiner Meinung nach mit der 
Spezifikation von 'getSatisfyingAssignment'.

Denn:
Der Test schlägt fehl, da meine Implementation für die Formel "(a \/ c) /\ (a 
\/ ~b) /\ (b \/ ~a)" folgende Belegung der Map zurückgibt: '{b=true, a=true}'.
Der Grund, aus dem der Test fehl schlägt ist: 
"Mapping for variable c is missing (variable occurs in clause (a \/ c)), 
therefore the cnf (a \/ c) /\ (a \/ ~b) /\ (b \/ ~a) is not satisfied."

Wenn man sich aber den Kommentar bei 'getSatisfyingAssignment' anschaut, dann 
steht da in den Kommentaren:
"Variablen die in der Map keine Zuordnung erhalten, können auf einen 
beliebigen Wert gesetzt werden."

Also ist es doch korrekt, dass c nicht in der Map enthalten ist, da c beliebig 
sein kann, wenn a und b wahr sind. (Kann man sich ja anhand einer 
Wahrheitstabelle schnell klar machen.)

Voele Grüße.

Original issue reported on code.google.com by [email protected] on 9 Jul 2012 at 6:37

testIntegrationSat1 behauptet ich würde manches nicht als erfüllbar erkennen. Die Angegebenen Beispiele sollten jedoch eigentlich erkannt werden

Hallo,

bei mir gibt testIntegrationSat1 von IntegrationFelixTest an ich würde einige 
subtests nicht bestehen. Interessant ist schonmal, dass die Zahl der nicht 
bestandenen Tests schwankt. Manchmal sind es 160 nicht bestandene 
Tests,manchmal sind es 190, immer etwas in dieser Größenordnung. In der 
Konsole wird dann angegeben, dass ich bei einigen Formeln nicht erkannt habe, 
dass diese erfüllbar sind. Wenn ich aber genau die selbe Formel in 
IntegrationTestNonPublic einfüge und diesen Test laufen lasse, gibt er mir an 
diese Formel sei erfüllbar! Hat jemand eine Idee wie dieser Wiederspruch 
zustande kommt?

Original issue reported on code.google.com by [email protected] on 8 Jul 2012 at 1:17

DPLLAlgorithm "performance"

We could test how many iterate()-steps a user needs, to make sure they didn't 
forget to implement an optimization.

Original issue reported on code.google.com by [email protected] on 25 Jun 2012 at 6:31

isPure test

Das mit dem isPure ist etwas verwirrend gewesen, kleine test waeren sinnvoll, 
sodass man nicht ausversehen wie ich bei isPure isnegated or isposive beides 
abfragt.

Original issue reported on code.google.com by [email protected] on 29 Jun 2012 at 10:47

TestUtilFelix.parseFileData

Current message:

A test file was not found. Try running the update tool again.
If that doesn't help, file a ticket.

It would be nice if it would also report the name and location of the file.

Example:

A test file was not found. Try running the update tool again.
If that doesn't help, file a ticket. (path was 
"exampels/Bweied/TotlalyWorng.txt")

Do you want to change that, or should I?

Original issue reported on code.google.com by [email protected] on 29 Jun 2012 at 12:25

Basic Tests

Some tests that check the use of binary operations, break, continue and local 
declarations.
Also contains some reconstructed nightlys to enable you to test them all day.

Original issue reported on code.google.com by [email protected] on 16 Jul 2012 at 7:52

Attachments:

CnfFactoryBewiedTest

Was testet denn der testCreateClauseGood genau? Bei mir schlagen alle Sub-Tests 
davon fehl, weil mein Programm angeblich eine UnsupportedOperationException 
wirft. Jedoch werfe ich in den entsprechenden Klassen keine solche Exception. 
Zudem habe ich Sub-Test 1 in einer der Public-Test-Klassen nachgebaut (habe 
dabei meine eigene CnfFactory benutzt) und habe mir dabei keine Exception 
eingefangen.

Original issue reported on code.google.com by [email protected] on 11 Jul 2012 at 7:07

CnfFactory

CnfFactory.createCnfFormula must check all the Variables for duplicate names.
Same goes for different methods of this class.

bewied, dumping ideas

Original issue reported on code.google.com by [email protected] on 22 Jun 2012 at 3:41

CnfFactoryMarkusTest

Der Test testCnfTruthValue aus CnfFactoryMarkusTest liefert bei mir folgende 
Meldung:

java.lang.AssertionError: Cnf (a,b,c): a=1, b=1, c=1. expected:<UNDEFINED> but 
was:<TRUE>
    at org.junit.Assert.fail(Assert.java:91)
    at org.junit.Assert.failNotEquals(Assert.java:645)
    at org.junit.Assert.assertEquals(Assert.java:126)
    at prog2.project3.tests.CnfFactoryMarkusTest.testCnfTruthValue(CnfFactoryMarkusTest.java:163)
... (gekürzt)

Meiner meinung nach ist TRUE aber richtig für a = b = c = TRUE (= 1)

(Ich poste als support, weil ich mir nicht sicher bin ob der Fehler bei mir 
liegt)

Original issue reported on code.google.com by [email protected] on 4 Jul 2012 at 6:25

Was testet SatisfyingAssignmentBewiedTest#testStandardSatisfiable ?

Hallo! Wollte erstmal anmerken dass ihr ne super Arbeit mit den Tests macht, 
danke dafür! ;)
Nun zu meinem Problem: Der Test 
SatisfyingAssignmentBewiedTest#testStandardSatisfiable schlägt bei mir fehl 
und nachdem IntegrationFelixTest bei mir klappt, wollte ich mal fragen, welche 
Ausdrücke da eigentlich getestet werden? Hier die Fehlermeldung:


________________________________________________________________________________
FAILURE: You failed the test 
SatisfyingAssignmentBewiedTest#testStandardSatisfiable.
This test has 5 subtests.
You failed 5 subtest(s) and passed 0 subtest(s).

This indicates that there is a general problem with your implementation.

The following information may or may not be helpful. If you don't understand 
it, file a support ticket here: 
https://code.google.com/p/prog2tests/issues/entry?template=support

You failed the following subtest(s): 1 2 3 4 5.

Some subtests left a message for you:

Message 1: _____________________________________________________________________
Test 1 failed with this message:
Your DPLLAlgorithm thought that prog2.project3.cnf.MyCnf@32bd1f4a is unsolvable.
Please make sure you pass IntegrationFelixTest.

Message 2: _____________________________________________________________________
Test 2 failed with this message:
Your DPLLAlgorithm thought that prog2.project3.cnf.MyCnf@29decdb7 is unsolvable.
Please make sure you pass IntegrationFelixTest.

Message 3: _____________________________________________________________________
Test 3 failed with this message:
Your DPLLAlgorithm thought that prog2.project3.cnf.MyCnf@95ba266f is unsolvable.
Please make sure you pass IntegrationFelixTest.

Information: ________________________________________________________
2 more message(s) were not printed.
End of failure message for test 
SatisfyingAssignmentBewiedTest#testStandardSatisfiable
________________________________________________________________________________

Original issue reported on code.google.com by [email protected] on 12 Jul 2012 at 4:11

Variable.equals() and .hashCode()

Variable.equals() and Variable.hashCode() SHOULD fall back to Object.equals() 
and Object.hashCode() respectively. I'll check that in CnfFactory.

Original issue reported on code.google.com by [email protected] on 24 Jun 2012 at 6:35

testBonus2SpecificationCompliance ist falsch

Nach der Spezifikation steht da:
"Um ein Pure-Literal zu finden, untersucht man für jede Variable die Klauseln, 
in denen die Variable vorkommt und deren Wahrheitswert noch nicht feststeht. "
Das heißt, dass bei    
Cnf cnf = TestUtilFelix.parseCompactCnfString("a-b"); 
cnf.getVariableForName("a").setTruthValue(TruthValue.TRUE); cnf.getVariableForNa
me("b").setTruthValue(TruthValue.UNDEFINED);

null zurueckgegeben wird, da die klausel schon einen wahrheitswert hat.

Original issue reported on code.google.com by [email protected] on 10 Jul 2012 at 6:53

loop, if and ternary labels

The labels of a loop/if/ternary may NEVER occur twice.
Tests could look like this:

int foo(int a) {
  int retVal = 0;
  if (a > 0) {
    if (a > 5) {
      retVal = 10;
    } else {
      retVal = 5;
    }
  } else {
    if (a < -5) {
      retVal = -10;
    } else {
      retVal = -5;
    }
  }
  return retVal;
}

And now test with -15, -3, 3, and 15.

Original issue reported on code.google.com by [email protected] on 20 Jul 2012 at 11:00

Beta review

I tested the beta tests ^^. After finding some bugs on my side, I get the 
impression that they are correct. I have some remarks on CnfContentBewiedTest:

* ListeningBewiedClause should not build clauses containing null literals, see
https://forum.st.cs.uni-saarland.de/boards/viewthread?thread=1527
Better use some dummy name instead (tested it with MyDummy)

* The Messages of assertPureIsAny print the object name of the cnf and literal, 
instead of a human-readable string representation. The same goes for the 
methods above.

* I would suggest to put a dynamically typed toStr method in TestUtilFelix, 
that would call cnfToString, literalToString... depending on the type of the 
argument. Like this:

public static String toStr(Object o) {
    if (o instanceof Literal) return literalToString((Literal)o);
    if (o instanceof Clause)  return  clauseToString((Clause)o);
    if (o instanceof Cnf)     return     cnfToString((Cnf)o);
    throw new IllegalArgumentException("toStr: bad object type");
}

Besides, after seeing how Ben passes around closures, I get the impression that 
using scala or jython could make the tests much better readable (and easier to 
write, too). When I have time, I'll check out if that's possible. 

Original issue reported on code.google.com by [email protected] on 3 Jul 2012 at 3:44

Propositional.equals()

Should we test whether Propositional.equals() is good?
If we do that first, the whitespace check should become easier.
We might do that by running

String somestring;
createFrom(somestring).equals(somestring);

... so this doesn't depend on the tseiting part.
I mean, you can't expect a working tseiting-implementation when you wanna check 
whitespace conversion?

Original issue reported on code.google.com by [email protected] on 22 Jun 2012 at 7:18

If offline, warn only once, but verbose

If the user is offline or has no access to the repository, then make sure that 
the SatSolverUpdateTool only fails once. It should also print out a warning 
saying that it couldn't connect to the repo.
Assigned that to you Felix, since this was originally your file.
If you want, I can write that part, too.
(In the latter case, could you please word the "Warning!"-paragraph?)

Original issue reported on code.google.com by [email protected] on 5 Jul 2012 at 6:32

test for resetting the variable Generator

I just discovered that I forgot to reset the varGen before reading in a new 
formula so others probably will too. on the other hand we can also try to test 
if people use the VarGen 

Original issue reported on code.google.com by [email protected] on 1 Jul 2012 at 5:39

CnfContentBewiedTest testUnmodifiables

Hallo,

Bei mir schlägt jetzt nur noch der letzte Test von testUnmodifiables fehl, 
also der wo getestet wird, ob die parentclauses unmodifiable sind.

Das Problem ist, wie soll man das implementieren, ohne zusätzliche public 
Methoden einzufügen auf die man dann von anderen Klassen zugreift.

Man weiß erst nach dem Konstruktor von Clauses, dass jetzt keine Parentclauses 
mehr kommen können, kann dann aber nicht auf die parentclauses der einzelnen 
Variablen zugreifen, da es nur eine addparenclause gibt.

für Tips wie ich dieses Problem lösen kann wäre ich sehr dankbar :)

Original issue reported on code.google.com by [email protected] on 11 Jul 2012 at 12:04

Whitespace recognition

Test whether all kinds of whitespace, which is [ \t\n\x0B\f\r], are recognized 
and properly handled.
Check that whitespace that wasn't enlisted is NOT recognized as whitespace.
Check that mutliple whitespaces can occur.
Check that there can be any amount of whitespace leading or trailing the 
formula.

bewied, dumping ideas

Original issue reported on code.google.com by [email protected] on 22 Jun 2012 at 3:39

Variable independence day

Make sure that Variables are independent from one another.
Even when read in through readFormula, to avoid ANY buffering.

Original issue reported on code.google.com by [email protected] on 23 Jun 2012 at 4:11

Problem in Zusammenabeit der tests?

Nachdem der IntegrationFelixTest jetzt läuft, habe ich festgestellt, dass wenn 
ich die komplette Test Suite
auf einmal starte, der IntegrationSat1 mir eine NullpointerException in 
getConjugativeNormalForm() wirft. Wenn der Test einzeln läuft nicht.
Kann sein dass das an meiner Implementierung liegt, ist aber trotzdem seltsam.


Original issue reported on code.google.com by [email protected] on 6 Jul 2012 at 1:07

Tests by Markus Bauer

add the following test: 
https://forum.st.cs.uni-saarland.de/boards/viewthread?thread=1504

Original issue reported on code.google.com by [email protected] on 23 Jun 2012 at 3:40

We have the answer, but not the question.

Problem: We don't have the question yet.
Write a program to enumerate all the possible questions.

Warning: Might collapse universe, as the question shouldn't be right next to 
the answer.
On the other hand, this might already have happened.

Original issue reported on code.google.com by [email protected] on 12 Jul 2012 at 4:26

Extensive loop test

Hi, 
here a new test for loops. It tests while-loops, do-while-loops, break, 
continue and lots of combinations of them. In case of errors i tried to give 
the user feedback where they have to look for this error, including source and 
asm output (console). 

In the TestBaseMarkus.java there are some functions that might be interesting 
for you. Especially the CTS function, which converts a comment into a string. 
This way you can easily write codes over multiple lines and read clearly in 
test file's source. 

Hope you like it
Markus

PS: additionally i had a test for Bonus1, but you already have one. Mine had 
some more lines to check overflows: 
assertResult("int f(){return --2147483648;}", -(-2147483648)); // = -2147483648
assertResult("int f(){return (-2147483648) - 1;}", 2147483647);

Original issue reported on code.google.com by [email protected] on 18 Jul 2012 at 7:20

Attachments:

CnfContentBewiedTest => Abhängig von der Testreihenfolge?

Hallo.

Kann es sein, dass die Tests in "CnfContentBewiedTest" extrem abhängig davon 
sind, in welcher Reihenfolge die Tests laufen?
Denn jedesmal wenn man die Tests laufen lässt, dann tauchen sie ja im 
Testfenster in einer unterschiedlichen Reihenfolge auf (jedenfalls bei mir).
Jetzt ist es so, dass manchmal keine Tests fehlschlagen und manchmal 4 Tests 
fehlschlagen. Und wenn ich dann die Tests, die fehlschlagen, einfach einzeln 
laufen lasse, dann schlagen sie mal fehl und mal funktionieren sie.
Deshalb kam bei mir jetzt der Verdacht auf, dass die Tests vielleicht abhängig 
von der Reihenfolge sind, in der sie ausgeführt werden.

Ich kann mir da auch ehrlich gesagt keinen Reim drauf bilden. Normalerweise 
sollten ja immer die gleichen Ergebnisse bei den Tests rauskommen.

Original issue reported on code.google.com by [email protected] on 8 Jul 2012 at 9:35

wrong failure message in CnfContentBewiedTest

In CnfContentBewiedTest, assertPureIsAny shows this message:
assertNotNull("Your CNF " + cnf + " reported a pure-literal"
        + " although it should be one of: " + possString, pure);

That doesn't make sense, it should read "...reported no pore-literal..."

File: 
https://code.google.com/p/prog2tests/source/browse/src/CnfContentBewiedTest.java
?spec=svn55&r=55
Line: 575

Original issue reported on code.google.com by [email protected] on 3 Jul 2012 at 12:31

NichMeName offline

I'm currenntly sitting in the CIP-pool and writing this issue to inform you 
that:

I'm offline. No internet access. Lovely provider.
Never use Vodafon with Einzugsermächtigung. Don't. They can't use them. 
They're idiots.

Therefore, it'll be a while until I can commit, comment, or do ANYthing again.

Felix, I hope that 
https://code.google.com/p/prog2tests/source/browse/distribution/parserExample.tx
t is pretty intuitive.

The only things you really need is:

# this is a comment
# always end, but never start a path change with a pipe
examplesIBenI
# I can't find the pipe-key on this keyboard o.O
+downloadThis.txt
-removeThis.txt

There you go.
Everything that doesn't make sense is regarded a comment.

Original issue reported on code.google.com by [email protected] on 20 Jul 2012 at 10:56

null yourself

Test every. single. Method. For behaviour on null, like the nightlies currently 
do.

Original issue reported on code.google.com by [email protected] on 24 Jun 2012 at 9:54

empty collections

Test all relevant functions in CnfFactory for their behavior with empty 
Collections.

Original issue reported on code.google.com by [email protected] on 25 Jun 2012 at 6:56

IntegrationFelixTest

Hallo ich bins schon wieder. 
Beim Test IntegrationFelixTest testIntegrationSat1 faile ich knapp 129000 der 
tests. Was mich dabei nur wundert ist, dass unter anderem als Meldung kommt:

You did not recognize that a ! is satisfiable.

Wenn ich jetzt aber in einem eigenen Test die Formel a ! testen lasse, gibt er 
regulär true zurück. Nach dem Test Code müsste er für true allerdings in 
den else fall der abfrage gehen und die Meldung dürfte es garnicht geben. 
Ich hab per debugging meinen Algorithmus auch schritt für schritt mitverfolgt 
und zumindest für das beispiel läuft alles wie es soll.

Original issue reported on code.google.com by [email protected] on 5 Jul 2012 at 7:56

testIntMax

Nabend!
Der testIntMax aus der Klasse CompilerAndreasTest stimmt so nicht.
Bei (+) 2147483648 muss ne Exception fliegen, weil man mit nem Integer wegen 
TwoC nur Zahlen von -2147483648 bis +2147483647 darstellen kann (eben eine 
positive weniger als negative).

Ich hab mir selbst einen geschrieben, der das Verhalten richtig testet, dürft 
ihr gerne übernehmen ;-)

-> @Test
    public void testNightly6_Bonus1() throws Exception{
        assertTypeException(ParseEntity.PRG, "int test() {return 2147483648;}");
        assertResult(ParseEntity.PRG, "int test() {return -2147483648;}", -2147483648);
        assertResult(ParseEntity.PRG, "int test() {return 2147483647;}", 2147483647);
    }

Der stimmt so mit extrem großer Sicherheit, hab damit nämlich letztes 
Semester die Bonuspunkte dafür bekommen^^
Werde den aber auch nochmal im Forum in euren Test-Thread posten...

Original issue reported on code.google.com by [email protected] on 17 Jul 2012 at 10:56

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.