zoukankan      html  css  js  c++  java
  • Software Testing 2nd Assignment

    code 1:

    1. 没有考虑x == null的情况

    2. for循环应该遍历到i>= 0的时候才退出

    test1: x = [2, 3, 5]; y = 5

        expected = 2

        actual = 2

    test2: x = [2, 3, 5]; y = 1

        expected = -1

        actual = -1

    test3: x = null; y = 1

        expected = -1

        actual = -1

    code2 : 

    1. 没有考虑x == null的情况

    2. 返回的是数组中的第一个0而不是最后一个0

    test1: x = []

        expected = -1

        actual = -1

    test2: x =  [1, 2, 3]

        expected = -1

        actual = -1

    test3:  x = [0, 1, 2]

        expected = 0

        actual = 0

  • 相关阅读:
    python的Collections 模块
    python模块
    python类
    python异常
    python文件处理
    python函数
    python字符串
    python数据结构
    python循环
    下载Google Play外国区APP技巧
  • 原文地址:https://www.cnblogs.com/lyli/p/5263405.html
Copyright © 2011-2022 走看看