mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1773733 - Mark test-only methods as cfg(test); r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D159439
This commit is contained in:
parent
75cddf17e6
commit
22a6e7c007
@ -27,6 +27,8 @@ where
|
||||
P: Clone,
|
||||
B: Clone,
|
||||
{
|
||||
/// This method is useful for testing various configurations.
|
||||
#[cfg(feature = "test-fluent")]
|
||||
pub fn generate_bundles_for_lang(
|
||||
&self,
|
||||
langid: LanguageIdentifier,
|
||||
|
@ -52,6 +52,8 @@ impl<'a, B> L10nRegistryLocked<'a, B> {
|
||||
.expect("Index out-of-range")
|
||||
}
|
||||
|
||||
/// Get a [FileSource] by name from a metasource. This is useful for testing.
|
||||
#[cfg(feature = "test-fluent")]
|
||||
pub fn file_source_by_name(&self, metasource: usize, name: &str) -> Option<&FileSource> {
|
||||
self.lock
|
||||
.get(metasource)
|
||||
@ -60,6 +62,9 @@ impl<'a, B> L10nRegistryLocked<'a, B> {
|
||||
.find(|&source| source.name == name)
|
||||
}
|
||||
|
||||
/// Get an iterator for the [FileSources](FileSource) that match the [LanguageIdentifier]
|
||||
/// and [ResourceId].
|
||||
#[cfg(feature = "test-fluent")]
|
||||
pub fn generate_sources_for_file<'l>(
|
||||
&'l self,
|
||||
metasource: usize,
|
||||
|
@ -59,6 +59,7 @@ where
|
||||
P: Clone,
|
||||
B: Clone,
|
||||
{
|
||||
#[cfg(feature = "test-fluent")]
|
||||
pub fn generate_bundles_for_lang_sync(
|
||||
&self,
|
||||
langid: LanguageIdentifier,
|
||||
|
Loading…
Reference in New Issue
Block a user