PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 131
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main_test import ( "cmd/internal/cov/covcmd" "encoding/json" "fmt" "internal/testenv" "os" "path/filepath" "strings" "testing" ) func writeFile(t *testing.T, path string, contents []byte) { if err := os.WriteFile(path, contents, 0666); err != nil { t.Fatalf("os.WriteFile(%s) failed: %v", path, err) } } func writePkgConfig(t *testing.T, outdir, tag, ppath, pname string, gran string, mpath string) string { incfg := filepath.Join(outdir, tag+"incfg.txt") outcfg := filepath.Join(outdir, "outcfg.txt") p := covcmd.CoverPkgConfig{ PkgPath: ppath, PkgName: pname, Granularity: gran, OutConfig: outcfg, EmitMetaFile: mpath, } data, err := json.Marshal(p) if err != nil { t.Fatalf("json.Marshal failed: %v", err) } writeFile(t, incfg, data) return incfg } func writeOutFileList(t *testing.T, infiles []string, outdir, tag string) ([]string, string) { outfilelist := filepath.Join(outdir, tag+"outfilelist.txt") var sb strings.Builder cv := filepath.Join(outdir, "covervars.go") outfs := []string{cv} fmt.Fprintf(&sb, "%s\n", cv) for _, inf := range infiles { base := filepath.Base(inf) of := filepath.Join(outdir, tag+".cov."+base) outfs = append(outfs, of) fmt.Fprintf(&sb, "%s\n", of) } if err := os.WriteFile(outfilelist, []byte(sb.String()), 0666); err != nil { t.Fatalf("writing %s: %v", outfilelist, err) } return outfs, outfilelist } func runPkgCover(t *testing.T, outdir string, tag string, incfg string, mode string, infiles []string, errExpected bool) ([]string, string, string) { // Write the pkgcfg file. outcfg := filepath.Join(outdir, "outcfg.txt") // Form up the arguments and run the tool. outfiles, outfilelist := writeOutFileList(t, infiles, outdir, tag) args := []string{"-pkgcfg", incfg, "-mode=" + mode, "-var=var" + tag, "-outfilelist", outfilelist} args = append(args, infiles...) cmd := testenv.Command(t, testcover(t), args...) if errExpected { errmsg := runExpectingError(cmd, t) return nil, "", errmsg } else { run(cmd, t) return outfiles, outcfg, "" } } func TestCoverWithCfg(t *testing.T) { testenv.MustHaveGoRun(t) t.Parallel() // Subdir in testdata that has our input files of interest. tpath := filepath.Join("testdata", "pkgcfg") dir := tempDir(t) instdira := filepath.Join(dir, "insta") if err := os.Mkdir(instdira, 0777); err != nil { t.Fatal(err) } scenarios := []struct { mode, gran string }{ { mode: "count", gran: "perblock", }, { mode: "set", gran: "perfunc", }, { mode: "regonly", gran: "perblock", }, } var incfg string apkgfiles := []string{filepath.Join(tpath, "a", "a.go")} for _, scenario := range scenarios { // Instrument package "a", producing a set of instrumented output // files and an 'output config' file to pass on to the compiler. ppath := "cfg/a" pname := "a" mode := scenario.mode gran := scenario.gran tag := mode + "_" + gran incfg = writePkgConfig(t, instdira, tag, ppath, pname, gran, "") ofs, outcfg, _ := runPkgCover(t, instdira, tag, incfg, mode, apkgfiles, false) t.Logf("outfiles: %+v\n", ofs) // Run the compiler on the files to make sure the result is // buildable. bargs := []string{"tool", "compile", "-p", "a", "-coveragecfg", outcfg} bargs = append(bargs, ofs...) cmd := testenv.Command(t, testenv.GoToolPath(t), bargs...) cmd.Dir = instdira run(cmd, t) } // Do some error testing to ensure that various bad options and // combinations are properly rejected. // Expect error if config file inaccessible/unreadable. mode := "atomic" errExpected := true tag := "errors" _, _, errmsg := runPkgCover(t, instdira, tag, "/not/a/file", mode, apkgfiles, errExpected) want := "error reading pkgconfig file" if !strings.Contains(errmsg, want) { t.Errorf("'bad config file' test: wanted %s got %s", want, errmsg) } // Expect err if config file contains unknown stuff. t.Logf("mangling in config") writeFile(t, incfg, []byte("blah=foo\n")) _, _, errmsg = runPkgCover(t, instdira, tag, incfg, mode, apkgfiles, errExpected) want = "error reading pkgconfig file" if !strings.Contains(errmsg, want) { t.Errorf("'bad config file' test: wanted %s got %s", want, errmsg) } // Expect error on empty config file. t.Logf("writing empty config") writeFile(t, incfg, []byte("\n")) _, _, errmsg = runPkgCover(t, instdira, tag, incfg, mode, apkgfiles, errExpected) if !strings.Contains(errmsg, want) { t.Errorf("'bad config file' test: wanted %s got %s", want, errmsg) } } func TestCoverOnPackageWithNoTestFiles(t *testing.T) { testenv.MustHaveGoRun(t) // For packages with no test files, the new "go test -cover" // strategy is to run cmd/cover on the package in a special // "EmitMetaFile" mode. When running in this mode, cmd/cover walks // the package doing instrumention, but when finished, instead of // writing out instrumented source files, it directly emits a // meta-data file for the package in question, essentially // simulating the effect that you would get if you added a dummy // "no-op" x_test.go file and then did a build and run of the test. t.Run("YesFuncsNoTests", func(t *testing.T) { testCoverNoTestsYesFuncs(t) }) t.Run("NoFuncsNoTests", func(t *testing.T) { testCoverNoTestsNoFuncs(t) }) } func testCoverNoTestsYesFuncs(t *testing.T) { t.Parallel() dir := tempDir(t) // Run the cover command with "emit meta" enabled on a package // with functions but no test files. tpath := filepath.Join("testdata", "pkgcfg") pkg1files := []string{filepath.Join(tpath, "yesFuncsNoTests", "yfnt.go")} ppath := "cfg/yesFuncsNoTests" pname := "yesFuncsNoTests" mode := "count" gran := "perblock" tag := mode + "_" + gran instdir := filepath.Join(dir, "inst") if err := os.Mkdir(instdir, 0777); err != nil { t.Fatal(err) } mdir := filepath.Join(dir, "meta") if err := os.Mkdir(mdir, 0777); err != nil { t.Fatal(err) } mpath := filepath.Join(mdir, "covmeta.xxx") incfg := writePkgConfig(t, instdir, tag, ppath, pname, gran, mpath) _, _, errmsg := runPkgCover(t, instdir, tag, incfg, mode, pkg1files, false) if errmsg != "" { t.Fatalf("runPkgCover err: %q", errmsg) } // Check for existence of meta-data file. if inf, err := os.Open(mpath); err != nil { t.Fatalf("meta-data file not created: %v", err) } else { inf.Close() } // Make sure it is digestible. cdargs := []string{"tool", "covdata", "percent", "-i", mdir} cmd := testenv.Command(t, testenv.GoToolPath(t), cdargs...) run(cmd, t) } func testCoverNoTestsNoFuncs(t *testing.T) { t.Parallel() dir := tempDir(t) // Run the cover command with "emit meta" enabled on a package // with no functions and no test files. tpath := filepath.Join("testdata", "pkgcfg") pkgfiles := []string{filepath.Join(tpath, "noFuncsNoTests", "nfnt.go")} pname := "noFuncsNoTests" mode := "count" gran := "perblock" ppath := "cfg/" + pname tag := mode + "_" + gran instdir := filepath.Join(dir, "inst2") if err := os.Mkdir(instdir, 0777); err != nil { t.Fatal(err) } mdir := filepath.Join(dir, "meta2") if err := os.Mkdir(mdir, 0777); err != nil { t.Fatal(err) } mpath := filepath.Join(mdir, "covmeta.yyy") incfg := writePkgConfig(t, instdir, tag, ppath, pname, gran, mpath) _, _, errmsg := runPkgCover(t, instdir, tag, incfg, mode, pkgfiles, false) if errmsg != "" { t.Fatalf("runPkgCover err: %q", errmsg) } // We expect to see an empty meta-data file in this case. if inf, err := os.Open(mpath); err != nil { t.Fatalf("opening meta-data file: error %v", err) } else { defer inf.Close() fi, err := inf.Stat() if err != nil { t.Fatalf("stat meta-data file: %v", err) } if fi.Size() != 0 { t.Fatalf("want zero-sized meta-data file got size %d", fi.Size()) } } }