TEST_F(ZstdDecompressorStatsTest, ChargeErrorStats) {
  EXPECT_FALSE(isError(0)); // no error

  EXPECT_TRUE(isError(ZSTD_ERROR(memory_allocation)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_memory_error").value(), 1);

  EXPECT_TRUE(isError(ZSTD_ERROR(dictionary_corrupted)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_dictionary_error").value(), 1);
  EXPECT_TRUE(isError(ZSTD_ERROR(dictionary_wrong)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_dictionary_error").value(), 2);

  EXPECT_TRUE(isError(ZSTD_ERROR(checksum_wrong)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_checksum_wrong_error").value(), 1);

  EXPECT_TRUE(isError(-1)); // generic error
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_generic_error").value(), 1);
}
TEST_F(ZstdDecompressorStatsTest, ChargeErrorStats) {
  EXPECT_FALSE(isError(0));  

  EXPECT_TRUE(isError(ZSTD_ERROR(memory_allocation)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_memory_error").value(), 1);

  EXPECT_TRUE(isError(ZSTD_ERROR(dictionary_corrupted)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_dictionary_error").value(), 1);
  EXPECT_TRUE(isError(ZSTD_ERROR(dictionary_wrong)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_dictionary_error").value(), 2);

  EXPECT_TRUE(isError(ZSTD_ERROR(checksum_wrong)));
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_checksum_wrong_error").value(), 1);

  EXPECT_TRUE(isError(-1));  
  ASSERT_EQ(stats_store_.counterFromString("test.zstd_generic_error").value(), 1);
}