[libcamera-devel,3/5] test: camera: Remove test for bad Stream IDs

Message ID 20190403011221.12711-4-niklas.soderlund@ragnatech.se
State Accepted
Headers show
Series
  • libcamera: camera: Add support for stream roles
Related show

Commit Message

Niklas Söderlund April 3, 2019, 1:12 a.m. UTC
In preparation of reworking how a default configuration is retrieved
from a camera remove test that stream IDs must be valid as the data type
passed to Camera::streamConfiguration() will change. This change is in
preparation for an invasive change.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 test/camera/configuration_default.cpp | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Jacopo Mondi April 3, 2019, 1:20 p.m. UTC | #1
Hi Niklas,

On Wed, Apr 03, 2019 at 03:12:19AM +0200, Niklas Söderlund wrote:
> In preparation of reworking how a default configuration is retrieved
> from a camera remove test that stream IDs must be valid as the data type
> passed to Camera::streamConfiguration() will change. This change is in
> preparation for an invasive change.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  test/camera/configuration_default.cpp | 13 -------------
>  1 file changed, 13 deletions(-)
>
> diff --git a/test/camera/configuration_default.cpp b/test/camera/configuration_default.cpp
> index 53ee021d33ca39b1..856cd415f7a6aec1 100644
> --- a/test/camera/configuration_default.cpp
> +++ b/test/camera/configuration_default.cpp
> @@ -49,19 +49,6 @@ protected:
>  			return TestFail;
>  		}
>
> -		/*
> -		 * Test that asking for configuration for an array of bad streams
> -		 * returns an empty list of configurations.
> -		 */
> -		Stream *stream_bad = reinterpret_cast<Stream *>(0xdeadbeef);
> -		std::set<Stream *> streams_bad = { stream_bad };
> -		conf = camera_->streamConfiguration(streams_bad);
> -		if (!conf.empty()) {
> -			cout << "Failed to retrieve configuration for bad streams"
> -			     << endl;
> -			return TestFail;
> -		}
> -
>  		return TestPass;
>  	}
>  };
> --
> 2.21.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/test/camera/configuration_default.cpp b/test/camera/configuration_default.cpp
index 53ee021d33ca39b1..856cd415f7a6aec1 100644
--- a/test/camera/configuration_default.cpp
+++ b/test/camera/configuration_default.cpp
@@ -49,19 +49,6 @@  protected:
 			return TestFail;
 		}
 
-		/*
-		 * Test that asking for configuration for an array of bad streams
-		 * returns an empty list of configurations.
-		 */
-		Stream *stream_bad = reinterpret_cast<Stream *>(0xdeadbeef);
-		std::set<Stream *> streams_bad = { stream_bad };
-		conf = camera_->streamConfiguration(streams_bad);
-		if (!conf.empty()) {
-			cout << "Failed to retrieve configuration for bad streams"
-			     << endl;
-			return TestFail;
-		}
-
 		return TestPass;
 	}
 };