Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. DataLoadTest.testLoadSources() has thrown a ComparisonFailure
  2. JUnit "equals" comparison failed

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
org.junit.ComparisonFailure: Errors encountered while loading Pathfinder Society Organized Play Mode expected:<[]> but was:<[file:/home/travis/build/PCGen/pcgen/data/pathfinder/paizo/player_companion/people_of_the_north/_pfs/pfs_potn_equip_general.lst (7): PObject Pelt of Primal Power not found; .MOD skipped., file:/home/travis/build/PCGen/pcgen/data/pathfinder/paizo/player_companion/people_of_the_north/_pfs/pfs_potn_equip_general.lst (8): PObject Saga of the Linnorm Kings not found; .MOD skipped., file:/home/travis/build/PCGen/pcgen/data/pathfinder/paizo/player_companion/people_of_the_north/_pfs/pfs_potn_equip_general.lst (9): PObject Shard of Winter not found; .MOD skipped.]>
    at org.junit.Assert.assertEquals(
    at pcgen.persistence.lst.DataLoadTest.testLoadSources(


igorski3 months ago

ComparisonFailure is thrown when using JUnit's internal assertions to compare two strings, number or objects that are not equal. The simplest code to reproduce the error is the following:

import static org.junit.Assert.assertEquals;

public class ObjectComparisonTest { 

   public void shouldAssertStrings() { 
      assertEquals("Jhon", "John");  //The letters are in different order

   public void shouldAssertNumbers() { 
      assertEquals(1, 2); 

   public void shouldAssertObjects() {
      Person p1 = new Person();
      Person p2 = new Person();
      assertEquals(p1, p2);  // The object instances are not the same

class Person { ... }

Mind the static import. The assertEquals is part of the JUnit API.

External results for this pattern (10)

  1. ttsugriyvia GitHub3 days ago
    Stub for com/example/buck/A.class is not correct expected:<...tation;() : FIELD, 0[] // invisible // ...> but was:<...tation;() : FIELD, 0[;] // invisible // ...>
    Show stack trace
  2. codingphilvia GitHub3 days ago
    expected:<[1]> but was:<[0]>
    Show stack trace
  3. expected:<.[ContactsListActivity]> but was:<.[ApiDemos]>
    Show stack trace
  4. hasancelikvia GitHub5 days ago
    expected:<[LatestUpdatedV]alue2> but was:<[v]alue2>
    Show stack trace
  5. zonghaishangvia GitHub1 week ago
    expected:<... exceeds size limit:[100]> but was:<... exceeds size limit:[ 100, try to specify -M size_limit in your command, check the help command for more.]>
    Show stack trace
  6. Jared Martinvia Google Groups1 week ago
    expected:<[hello world!]> but was:<[Mock for Foo, hashCode: 936146014]>
    Show stack trace
  7. handycccvia GitHub2 weeks ago
    expected:<[Futur]e-day Pickup> but was:<[Sam]e-day Pickup>
    Show stack trace
  8. tcurdtvia GitHub4 weeks ago
    unexpected resolve for #!/usr/bin/python3 -B line = line.replace('@ALLOW_BATCH_FILTER@', config[self.client]['ALLOW_BATCH_FILTER']) expected:<..., config[self.client[]['ALLOW_BATCH_FILTER'])]> but was:<..., config[self.client[[]'ALLOW_BATCH_FILTER']) ]>
    Show stack trace
  9. mcomellavia GitHub4 weeks ago
    for input:a网络|| expected:<[网络.]cn> but was:<[]cn>
    Show stack trace
  10. julianofischervia GitHub1 month ago differs! expected:<... 347 2 8 ... 1794...>
    Show stack trace