Browse Source

Don't use deprecated Corrade functionality.

pull/193/head
Vladimír Vondruš 9 years ago
parent
commit
4509dbb1b1
  1. 2
      src/Magnum/MeshTools/Test/CompressIndicesTest.cpp
  2. 5
      src/Magnum/MeshTools/Test/InterleaveTest.cpp
  3. 54
      src/Magnum/Test/FramebufferGLTest.cpp
  4. 14
      src/Magnum/Text/Test/AbstractFontConverterTest.cpp
  5. 11
      src/Magnum/Trade/Test/AbstractImageConverterTest.cpp
  6. 67
      src/MagnumPlugins/WavAudioImporter/Test/WavImporterTest.cpp

2
src/Magnum/MeshTools/Test/CompressIndicesTest.cpp

@ -116,7 +116,7 @@ void CompressIndicesTest::compressInt() {
void CompressIndicesTest::compressAsShort() {
CORRADE_COMPARE_AS(MeshTools::compressIndicesAs<UnsignedShort>({123, 456}),
Containers::Array<UnsignedShort>::from(123, 456),
(Containers::Array<UnsignedShort>{Containers::InPlaceInit, {123, 456}}),
TestSuite::Compare::Container);
std::ostringstream out;

5
src/Magnum/MeshTools/Test/InterleaveTest.cpp

@ -130,12 +130,11 @@ void InterleaveTest::writeGaps() {
}
void InterleaveTest::interleaveInto() {
auto data = Containers::Array<char>::from(
Containers::Array<char> data{Containers::InPlaceInit, {
0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77,
0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77,
0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77,
0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77
);
0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77, 0x11, 0x33, 0x55, 0x77}};
MeshTools::interleaveInto(data, 2, std::vector<Int>{4, 5, 6, 7}, 1, std::vector<Short>{0, 1, 2, 3}, 3);

54
src/Magnum/Test/FramebufferGLTest.cpp

@ -1247,7 +1247,7 @@ void FramebufferGLTest::copyImageTexture1D() {
CORRADE_COMPARE(texture.imageSize(0)[0], 2);
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b),
(Containers::Array<char>{Containers::InPlaceInit, {0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b}}),
TestSuite::Compare::Container);
}
#endif
@ -1285,8 +1285,9 @@ void FramebufferGLTest::copyImageTexture2D() {
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE(texture.imageSize(0), Vector2i{2});
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b),
(Containers::Array<char>{Containers::InPlaceInit, {
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b}}),
TestSuite::Compare::Container);
#endif
}
@ -1312,8 +1313,9 @@ void FramebufferGLTest::copyImageTexture1DArray() {
CORRADE_COMPARE(texture.imageSize(0), Vector2i{2});
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b),
(Containers::Array<char>{Containers::InPlaceInit, {
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b}}),
TestSuite::Compare::Container);
}
@ -1337,8 +1339,9 @@ void FramebufferGLTest::copyImageRectangleTexture() {
CORRADE_COMPARE(texture.imageSize(), Vector2i{2});
CORRADE_COMPARE_AS(texture.image({PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b),
(Containers::Array<char>{Containers::InPlaceInit, {
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b}}),
TestSuite::Compare::Container);
}
#endif
@ -1376,8 +1379,9 @@ void FramebufferGLTest::copyImageCubeMapTexture() {
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE(texture.imageSize(0), Vector2i{2});
CORRADE_COMPARE_AS(texture.image(CubeMapCoordinate::PositiveX, 0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b),
(Containers::Array<char>{Containers::InPlaceInit, {
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b}}),
TestSuite::Compare::Container);
#endif
}
@ -1402,8 +1406,8 @@ void FramebufferGLTest::copySubImageTexture1D() {
MAGNUM_VERIFY_NO_ERROR();
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00),
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
}
#endif
@ -1442,11 +1446,11 @@ void FramebufferGLTest::copySubImageTexture2D() {
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
#endif
}
@ -1489,7 +1493,7 @@ void FramebufferGLTest::copySubImageTexture3D() {
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -1498,7 +1502,7 @@ void FramebufferGLTest::copySubImageTexture3D() {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
#endif
}
@ -1526,11 +1530,11 @@ void FramebufferGLTest::copySubImageTexture1DArray() {
MAGNUM_VERIFY_NO_ERROR();
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
}
#endif
@ -1560,7 +1564,7 @@ void FramebufferGLTest::copySubImageTexture2DArray() {
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -1569,7 +1573,7 @@ void FramebufferGLTest::copySubImageTexture2DArray() {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
#endif
}
@ -1597,11 +1601,11 @@ void FramebufferGLTest::copySubImageRectangleTexture() {
MAGNUM_VERIFY_NO_ERROR();
CORRADE_COMPARE_AS(texture.image({PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
}
#endif
@ -1640,11 +1644,11 @@ void FramebufferGLTest::copySubImageCubeMapTexture() {
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE_AS(texture.image(CubeMapCoordinate::NegativeY, 0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
#endif
}
@ -1677,7 +1681,7 @@ void FramebufferGLTest::copySubImageCubeMapTextureArray() {
#ifndef MAGNUM_TARGET_GLES
CORRADE_COMPARE_AS(texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}).release(),
Containers::Array<char>::from(
(Containers::Array<char>{Containers::InPlaceInit, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -1706,7 +1710,7 @@ void FramebufferGLTest::copySubImageCubeMapTextureArray() {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}),
TestSuite::Compare::Container);
#endif
}

14
src/Magnum/Text/Test/AbstractFontConverterTest.cpp

@ -127,8 +127,8 @@ void AbstractFontConverterTest::exportFontToFile() {
/* Why the hell GCC 4.9 fails to do proper move so I need to
work around that this ugly way?! */
std::vector<std::pair<std::string, Containers::Array<char>>> ret;
ret.emplace_back(filename, Containers::Array<char>::from('\xf0'));
ret.emplace_back(filename + ".data", Containers::Array<char>::from('\xfe', '\xed'));
ret.emplace_back(filename, Containers::Array<char>{Containers::InPlaceInit, {'\xf0'}});
ret.emplace_back(filename + ".data", Containers::Array<char>{Containers::InPlaceInit, {'\xfe', '\xed'}});
return ret;
}
};
@ -153,7 +153,7 @@ void AbstractFontConverterTest::exportGlyphCacheToSingleData() {
Features doFeatures() const override { return Feature::ConvertData|Feature::ExportGlyphCache; }
Containers::Array<char> doExportGlyphCacheToSingleData(GlyphCache&) const override {
return Containers::Array<char>::from('\xee');
return Containers::Array<char>{Containers::InPlaceInit, {'\xee'}};
}
};
@ -162,7 +162,9 @@ void AbstractFontConverterTest::exportGlyphCacheToSingleData() {
auto ret = exporter.exportGlyphCacheToData(nullGlyphCache, "font.out");
CORRADE_COMPARE(ret.size(), 1);
CORRADE_COMPARE(ret[0].first, "font.out");
CORRADE_COMPARE_AS(ret[0].second, Containers::Array<char>::from('\xee'), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(ret[0].second,
(Containers::Array<char>{Containers::InPlaceInit, {'\xee'}}),
TestSuite::Compare::Container);
}
void AbstractFontConverterTest::exportGlyphCacheToFile() {
@ -174,8 +176,8 @@ void AbstractFontConverterTest::exportGlyphCacheToFile() {
/* Why the hell GCC 4.9 fails to do proper move so I need to
work around that this ugly way?! */
std::vector<std::pair<std::string, Containers::Array<char>>> ret;
ret.emplace_back(filename, Containers::Array<char>::from('\xf0'));
ret.emplace_back(filename + ".data", Containers::Array<char>::from('\xfe', '\xed'));
ret.emplace_back(filename, Containers::Array<char>{Containers::InPlaceInit, {'\xf0'}});
ret.emplace_back(filename + ".data", Containers::Array<char>{Containers::InPlaceInit, {'\xfe', '\xed'}});
return ret;
}
};

11
src/Magnum/Trade/Test/AbstractImageConverterTest.cpp

@ -64,7 +64,8 @@ void AbstractImageConverterTest::exportToFile() {
Features doFeatures() const override { return Feature::ConvertData; }
Containers::Array<char> doExportToData(const ImageView2D& image) override {
return Containers::Array<char>::from(char(image.size().x()), char(image.size().y()));
return Containers::Array<char>{Containers::InPlaceInit,
{char(image.size().x()), char(image.size().y())}};
};
};
@ -86,11 +87,11 @@ class ImageDataExporter: public Trade::AbstractImageConverter {
Features doFeatures() const override { return Feature::ConvertData; }
Containers::Array<char> doExportToData(const ImageView2D&) override {
return Containers::Array<char>::from('B');
return Containers::Array<char>{Containers::InPlaceInit, {'B'}};
};
Containers::Array<char> doExportToData(const CompressedImageView2D&) override {
return Containers::Array<char>::from('C');
return Containers::Array<char>{Containers::InPlaceInit, {'C'}};
};
};
@ -103,13 +104,13 @@ void AbstractImageConverterTest::exportToDataImageData() {
/* Should get "B" when converting uncompressed */
ImageData2D image{PixelFormat::RGBA, PixelType::UnsignedByte, {}, nullptr};
CORRADE_COMPARE_AS(exporter.exportToData(image),
Containers::Array<char>::from('B'),
(Containers::Array<char>{Containers::InPlaceInit, {'B'}}),
TestSuite::Compare::Container);
} {
/* Should get "C" when converting compressed */
ImageData2D image{PixelFormat::RGBA, PixelType::UnsignedByte, {}, nullptr};
CORRADE_COMPARE_AS(exporter.exportToData(image),
Containers::Array<char>::from('B'),
(Containers::Array<char>{Containers::InPlaceInit, {'C'}}),
TestSuite::Compare::Container);
}
}

67
src/MagnumPlugins/WavAudioImporter/Test/WavImporterTest.cpp

@ -184,8 +184,8 @@ void WavImporterTest::invalidFactChunk() {
CORRADE_COMPARE(importer.frequency(), 22050);
CORRADE_COMPARE_AS(importer.data().prefix(8),
Containers::Array<char>::from(-27, -11, -1, -9, 24, -6, 127, -5).prefix(8),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {-27, -11, -1, -9, 24, -6, 127, -5}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::mono4() {
@ -205,8 +205,8 @@ void WavImporterTest::mono8() {
CORRADE_COMPARE(importer.frequency(), 22050);
CORRADE_COMPARE_AS(importer.data().prefix(4),
Containers::Array<char>::from(127, 127, 127, 127).prefix(4),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {127, 127, 127, 127}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::mono8junk() {
@ -217,8 +217,8 @@ void WavImporterTest::mono8junk() {
CORRADE_COMPARE(importer.frequency(), 22050);
CORRADE_COMPARE_AS(importer.data().prefix(4),
Containers::Array<char>::from(127, 127, 127, 127).prefix(4),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {127, 127, 127, 127}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::mono8ALaw() {
@ -229,8 +229,8 @@ void WavImporterTest::mono8ALaw() {
CORRADE_COMPARE(importer.frequency(), 8000);
CORRADE_COMPARE_AS(importer.data().prefix(8),
Containers::Array<char>::from(87, 84, 85, 85, 85, -43, -43, -43).prefix(8),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {87, 84, 85, 85, 85, -43, -43, -43}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::mono8MuLaw() {
@ -241,8 +241,8 @@ void WavImporterTest::mono8MuLaw() {
CORRADE_COMPARE(importer.frequency(), 8000);
CORRADE_COMPARE_AS(importer.data().prefix(8),
Containers::Array<char>::from(-5, -3, -1, -2, -1, 127, 127, 126).prefix(8),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {-5, -3, -1, -2, -1, 127, 127, 126}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::mono16() {
@ -253,8 +253,8 @@ void WavImporterTest::mono16() {
CORRADE_COMPARE(importer.frequency(), 44000);
CORRADE_COMPARE_AS(importer.data(),
Containers::Array<char>::from('\x1d', '\x10', '\x71', '\xc5'),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {'\x1d', '\x10', '\x71', '\xc5'}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::stereo4() {
@ -274,8 +274,8 @@ void WavImporterTest::stereo8() {
CORRADE_COMPARE(importer.frequency(), 96000);
CORRADE_COMPARE_AS(importer.data(),
Containers::Array<char>::from('\xde', '\xfe', '\xca', '\x7e'),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {'\xde', '\xfe', '\xca', '\x7e'}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::stereo8ALaw() {
@ -286,8 +286,8 @@ void WavImporterTest::stereo8ALaw() {
CORRADE_COMPARE(importer.frequency(), 8000);
CORRADE_COMPARE_AS(importer.data().prefix(8),
Containers::Array<char>::from(-43, -43, -43, -43, -43, -43, 85, -43).prefix(8),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {-43, -43, -43, -43, -43, -43, 85, -43}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::stereo8MuLaw() {
@ -298,8 +298,8 @@ void WavImporterTest::stereo8MuLaw() {
CORRADE_COMPARE(importer.frequency(), 8000);
CORRADE_COMPARE_AS(importer.data().prefix(8),
Containers::Array<char>::from(-1, -1, -1, -1, -1, -1, 127, -1).prefix(8),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {-1, -1, -1, -1, -1, -1, 127, -1}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::stereo12() {
@ -320,8 +320,8 @@ void WavImporterTest::stereo16() {
CORRADE_COMPARE(importer.frequency(), 44100);
CORRADE_COMPARE_AS(importer.data(),
Containers::Array<char>::from(39, 79, 39, 79),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {39, 79, 39, 79}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::stereo24() {
@ -352,8 +352,8 @@ void WavImporterTest::mono32f() {
CORRADE_COMPARE(importer.frequency(), 48000);
CORRADE_COMPARE_AS(importer.data().prefix(16),
Containers::Array<char>::from(0, 0, 0, 0, 108, 57, -103, 59, 3, 63, 42, 60, -33, -81, -120, 60).prefix(16),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {0, 0, 0, 0, 108, 57, -103, 59, 3, 63, 42, 60, -33, -81, -120, 60}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::stereo32f() {
@ -364,8 +364,8 @@ void WavImporterTest::stereo32f() {
CORRADE_COMPARE(importer.frequency(), 44100);
CORRADE_COMPARE_AS(importer.data().prefix(8),
Containers::Array<char>::from(17, -77, -103, 56, 5, 50, 72, 56).prefix(8),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {17, -77, -103, 56, 5, 50, 72, 56}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::stereo64f() {
@ -376,15 +376,16 @@ void WavImporterTest::stereo64f() {
CORRADE_COMPARE(importer.frequency(), 8000);
CORRADE_COMPARE_AS(importer.data().prefix(64),
Containers::Array<char>::from(0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0, 16, 63,
0, 0, 0, 0, 0, 0, 24, -65,
0, 0, 0, 0, 0, 0, 0, 0).prefix(64),
TestSuite::Compare::Container);
(Containers::Array<char>{Containers::InPlaceInit, {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0, 16, 63,
0, 0, 0, 0, 0, 0, 24, -65,
0, 0, 0, 0, 0, 0, 0, 0}}),
TestSuite::Compare::Container<Containers::ArrayView<const char>>);
}
void WavImporterTest::surround51Channel16() {

Loading…
Cancel
Save