func TestSecretTooLarge(t *testing.T) {
	t.Parallel()
	SetLoggingLevel(logging.Level(*loggingLevel))

	// Load clean image
	var cleanImg StegImage
	err := cleanImg.LoadImageFromFile(tinyImageFile)
	if err != nil {
		t.Error(err)
	}

	b := cleanImg.imgLoaded.Bounds()
	max := b.Max.X * b.Max.Y * 3
	longString := strings.Repeat("a", max+1)

	err = cleanImg.DoStegEmbed(longString)
	// Check for expected error
	expectedError := "not enough pixels to hide secret"
	if err.Error() != expectedError {
		t.Error("Correct Error not thrown, expected: '" + expectedError + "' got: '" + err.Error() + "'")
	}
}
// TestSecretTooLarge verifies that an error is thrown when the image
// is too small to embed the secret string inside
TestSecretTooLarge verifies that an error is thrown when the image
is too small to embed the secret string inside
// TestSecretTooLarge verifies that an error is thrown when the image // is too small to embed the secret string inside
func TestSecretTooLarge(t *testing.T) {
	t.Parallel()
	SetLoggingLevel(logging.Level(*loggingLevel))
	var cleanImg StegImage
	err := cleanImg.LoadImageFromFile(tinyImageFile)
	if err != nil {
		t.Error(err)
	}
	b := cleanImg.imgLoaded.Bounds()
	max := b.Max.X * b.Max.Y * 3
	longString := strings.Repeat("a", max+1)
	err = cleanImg.DoStegEmbed(longString)
	expectedError := "not enough pixels to hide secret"
	if err.Error() != expectedError {
		t.Error("Correct Error not thrown, expected: '" + expectedError + "' got: '" + err.Error() + "'")
	}
}
func TestSecretTooLarge ( t * testing . T ) { t . Parallel ( ) SetLoggingLevel ( logging . Level ( * loggingLevel ) ) var cleanImg StegImage err := cleanImg . LoadImageFromFile ( tinyImageFile ) if err != nil { t . Error ( err ) } b := cleanImg . imgLoaded . Bounds ( ) max := b . Max . X * b . Max . Y * 3 longString := strings . Repeat ( " " , max + 1 ) err = cleanImg . DoStegEmbed ( longString ) expectedError := " " if err . Error ( ) != expectedError { t . Error ( " " + expectedError + " " + err . Error ( ) + " " ) } }
TestSecretTooLarge verifies that an error is thrown when the image
is too small to embed the secret string inside
TestSecretTooLarge verifies that an error is thrown when the image is too small to embed the secret string inside
// Load clean image // Check for expected error