diff --git a/source/graphics/ColladaManager.cpp b/source/graphics/ColladaManager.cpp index 31d3daa562..25a7912e09 100644 --- a/source/graphics/ColladaManager.cpp +++ b/source/graphics/ColladaManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -22,7 +22,6 @@ #include #include "graphics/ModelDef.h" -#include "lib/fnv_hash.h" #include "maths/MD5.h" #include "ps/CacheLoader.h" #include "ps/CLogger.h" diff --git a/source/lib/tests/test_fnv_hash.h b/source/lib/tests/test_fnv_hash.h index ef768f3d51..bf8b09939e 100644 --- a/source/lib/tests/test_fnv_hash.h +++ b/source/lib/tests/test_fnv_hash.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -40,4 +40,11 @@ public: TS_ASSERT_EQUALS(h2, 0xD80BDA3FBE244A0Aull); // verify value for simple string TS_ASSERT_EQUALS(fnv_hash64("abcdef", 6), h2); // same result if hashing buffer } + + void test_collisions() + { + TS_ASSERT_EQUALS(fnv_hash("collisions", 10), fnv_hash("silage_formism", 14)); + TS_ASSERT_EQUALS(fnv_hash("2018-04-13 06:10", 16), fnv_hash("1984-05-01 06:20", 16)); + TS_ASSERT_EQUALS(fnv_hash("etude", 5), fnv_hash("nonassister", 11)); + } };