lib: fix "go test" example names

This commit is contained in:
Nigel Tao committed 2025-02-11 15:45:38 +11:00
1 parent 2cac96f56b
commit 689f84213f
5 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ import (
"github.com/google/wuffs/lib/litonlylzma"
)
func ExampleRoundTripLZMA() {
func Example_roundTripLZMA() {
original := []byte("Hello world.\n")
compressed, err := litonlylzma.FileFormatLZMA.Encode(nil, original)
if err != nil {
@@ -45,7 +45,7 @@ func ExampleRoundTripLZMA() {
// Hello world.
}
func ExampleRoundTripXz() {
func Example_roundTripXz() {
original := []byte("Hello world.\n")
compressed, err := litonlylzma.FileFormatXz.Encode(nil, original)
if err != nil {
+2 -2
View File
@@ -21,10 +21,10 @@ import (
"github.com/google/wuffs/lib/lowleveljpeg"
)
// Example_Basic demonstrates creating an opaque RGBA image and saving it as a
// Example_basic demonstrates creating an opaque RGBA image and saving it as a
// JPEG. It uses 4:2:0 chroma subsampling, the most popular choice for colorful
// (not gray) JPEG images.
func Example_Basic() {
func Example_basic() {
const width, height = 40, 30
src := image.NewRGBA(image.Rect(0, 0, width, height))
+2 -2
View File
@@ -21,10 +21,10 @@ import (
"github.com/google/wuffs/lib/lowleveljpeg"
)
// Example_YCbCr444 demonstrates loading an RGB PNG, converting to YCbCr and to
// Example_yCbCr444 demonstrates loading an RGB PNG, converting to YCbCr and to
// DCT space and saving as a 4:4:4 JPEG. Multiple JPEG outputs from the one PNG
// input demonstrate making further transforms during conversion.
func Example_YCbCr444() {
func Example_yCbCr444() {
// levels holds a rough, ad hoc measure of a coefficient's frequency, in
// DCT space. Low (or high) levels[i] mean low (or high) frequency.
//
+1 -1
View File
@@ -103,7 +103,7 @@ type EncoderOptions struct {
//
// To get ArrayNBlockI16 values from pixels, use ExtractFrom on an image.Image
// (to get an array of BlockU8 values) and then FowardDCTFrom (to get an array
// of BlockI16 values). See Example_Basic for an example.
// of BlockI16 values). See Example_basic for an example.
//
// An Encoder makes no allocations, other than the Encoder struct itself and
// any allocations that the passed io.Writer makes.
+1 -1
View File
@@ -21,7 +21,7 @@ import (
"github.com/google/wuffs/lib/zlibcut"
)
func ExampleCut() {
func Example() {
const sonnet18 = "" +
"Shall I compare thee to a summer’s day?\n" +
"Thou art more lovely and more temperate.\n" +