private TestCaseData GenerateRandomTestCaseData(int version)
        {
			int matrixSize = VersionDetail.Width(version);
			ByteMatrix matrix = new ByteMatrix(matrixSize, matrixSize);
			EmbedAlignmentPattern(matrix, version);
			return new TestCaseData(version, matrix.ToBitMatrix()).SetName(string.Format(s_TestNameFormat, matrixSize, version));
		}
		private TestCaseData GenerateRandomTestCaseData(int version, int totalCodewords, Random randomizer)
        {
			int matrixSize = VersionDetail.Width(version);
			ByteMatrix matrix = new ByteMatrix(matrixSize, matrixSize);
			BitVector codewords = GenerateDataCodewords(totalCodewords, randomizer);
			EmbedAlignmentPattern(matrix, version, codewords);
			return new TestCaseData(version, matrix.ToBitMatrix(), codewords).SetName(string.Format(s_TestNameFormat, matrixSize, version));
		}
Exemple #3
0
		internal BitMatrix GetOriginal(int matrixSize, Random randomizer, out ByteMatrix matrix)
        {
            matrix = new ByteMatrix(matrixSize, matrixSize);

            FillRandom(matrix, randomizer);
            return matrix.ToBitMatrix();
        }
 private TestCaseData GenerateRandomTestCaseData(int matrixSize, int version)
 {
     ByteMatrix matrix = new ByteMatrix(matrixSize, matrixSize);
     EmbedAlignmentPattern(matrix, version);
     return new TestCaseData(version, matrix.ToBitMatrix());
 }