robylin
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 計概筆記 # reference and pointer ```C++ int x = 1; int *xPtr; int y = 2; xPtr = &x; // 將指標 xPtr 指向變數 x 的位址 *xPtr = 3; // 將指標 xPtr 指向的內容設為 3 (改變變數 x 的值) xPtr = &y; // 將指標 xPtr 指向變數 y 的位址 cout << x << endl; // 印出變數 x 的值 ``` * 改變指標的內容 (**`*xPtr = value;`**) - 指的是修改指標指向的變數的值,這會直接影響該變數的內容。 * 改變指標的指向 (**`xPtr = &y;`**) - 指的是將指標指向另一個變數的位址,這並不影響原來指向的變數的值。 # glass-box testing and balck-box testing 在軟體測試中,**Glass-Box Testing**(玻璃盒測試)和 **Black-Box Testing**(黑盒測試)是兩種主要的測試方法,它們基於不同的測試範圍與策略。 --- ### **Glass-Box Testing(玻璃盒測試)** #### **定義** 玻璃盒測試,也稱為 **White-Box Testing**(白盒測試),是一種測試方法,測試人員可以直接了解軟體的內部結構、邏輯和實現方式,並基於這些資訊設計測試用例。 #### **特點** 1. 測試人員需要對程式碼或內部邏輯有深入的了解。 2. 強調覆蓋程式的不同路徑、分支和條件。 3. 目的是檢測邏輯錯誤、路徑覆蓋不足或未執行的代碼。 #### **優點** - 能有效檢測程式內部的邏輯錯誤。 - 可以測試所有的程式碼路徑,保證高覆蓋率。 - 減少隱藏的錯誤或死區代碼。 #### **缺點** - 實現成本高,因為需要深入分析程式碼。 - 無法有效測試功能需求是否滿足。 #### **例子** - **單元測試 (Unit Testing)**:測試單個函數或模組內部的邏輯。 - **語句覆蓋測試**:檢查所有程式語句是否都被執行。 - **條件覆蓋測試**:測試邏輯條件的所有可能結果(如 `if/else` 分支)。 --- ### **Black-Box Testing(黑盒測試)** #### **定義** 黑盒測試是一種測試方法,測試人員不需要了解軟體的內部結構,只基於輸入和輸出的結果來測試軟體是否正確執行。 #### **特點** 1. 測試人員僅關注功能規格和需求。 2. 測試用例是根據輸入值和預期的輸出來設計的。 3. 目的是檢測軟體功能的缺陷或與需求的不一致。 #### **優點** - 測試方法簡單且與實現細節無關。 - 更適合發現功能需求上的問題。 - 測試可以由非開發人員(如 QA 人員)執行。 #### **缺點** - 無法檢測程式內部的錯誤或邏輯問題。 - 測試覆蓋率較低,可能無法覆蓋所有程式路徑。 #### **例子** - **功能測試 (Functional Testing)**:驗證特定功能是否按預期運行。 - **邊界值測試 (Boundary Value Testing)**:檢查輸入邊界條件(如最大值或最小值)。 - **等價類劃分測試 (Equivalence Partitioning)**:將輸入分為幾個等價類來進行測試。 --- ### **比較** | 特性 | **Glass-Box Testing** | **Black-Box Testing** | |--------------------|--------------------------------------|---------------------------------------| | **是否了解內部結構** | 需要了解程式碼和內部實現 | 不需要了解程式碼,僅關注輸入和輸出 | | **測試目標** | 驗證內部邏輯正確性 | 驗證軟體是否滿足功能需求 | | **測試人員** | 通常是開發人員 | 通常是測試人員(或用戶) | | **測試案例設計依據** | 程式的邏輯和結構 | 軟體的需求和規格 | | **適用範圍** | 單元測試、細節測試 | 系統測試、功能測試 | --- ### **總結** 1. **玻璃盒測試** 適用於驗證內部邏輯是否正確,重點在程式碼結構上。 2. **黑盒測試** 適用於驗證功能是否滿足需求,重點在於輸入輸出是否正確。 3. 實際測試中,兩者通常會結合使用,以達到更全面的測試覆蓋率和更高的軟體質量。 # const * a const element can't use declarative to initialize, it must use member initializer ```C++ const int increment //wrong initialize Increment::Increment(int c, int i) :count(c) // increment = i wrong initialize (const cannot be declared and gived by a new value) increment(i) ``` # expression * (中左右) prefix noatation - 參數在後方 * (左中右) infix notation - 參數在兩旁 * (左右中) postfix notation - 參數在前面

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully